Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
92a86208
Unverified
Commit
92a86208
authored
Dec 28, 2021
by
Vsevolod Voloshyn
Committed by
GitHub
Dec 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(rvm): add latest `rb*` utility functions (#9812)
parent
4491588a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
README.md
plugins/rvm/README.md
+4
-0
rvm.plugin.zsh
plugins/rvm/rvm.plugin.zsh
+48
-0
No files found.
plugins/rvm/README.md
View file @
92a86208
...
@@ -16,6 +16,10 @@ plugins=(... rvm)
...
@@ -16,6 +16,10 @@ plugins=(... rvm)
|
`rb19`
|
`rvm use ruby-1.9.3`
|
|
`rb19`
|
`rvm use ruby-1.9.3`
|
|
`rb20`
|
`rvm use ruby-2.0.0`
|
|
`rb20`
|
`rvm use ruby-2.0.0`
|
|
`rb21`
|
`rvm use ruby-2.1.2`
|
|
`rb21`
|
`rvm use ruby-2.1.2`
|
|
`rb25`
|
`rvm use ruby-2.5.9`
|
|
`rb26`
|
`rvm use ruby-2.6.7`
|
|
`rb27`
|
`rvm use ruby-2.7.3`
|
|
`rb30`
|
`rvm use ruby-3.0.1`
|
|
`rvm-update`
|
`rvm get head`
|
|
`rvm-update`
|
`rvm get head`
|
|
`gems`
|
`gem list`
|
|
`gems`
|
`gem list`
|
|
`rvms`
|
`rvm gemset`
|
|
`rvms`
|
`rvm gemset`
|
plugins/rvm/rvm.plugin.zsh
View file @
92a86208
...
@@ -8,6 +8,10 @@ local ruby18='ruby-1.8.7'
...
@@ -8,6 +8,10 @@ local ruby18='ruby-1.8.7'
local
ruby19
=
'ruby-1.9.3'
local
ruby19
=
'ruby-1.9.3'
local
ruby20
=
'ruby-2.0.0'
local
ruby20
=
'ruby-2.0.0'
local
ruby21
=
'ruby-2.1.2'
local
ruby21
=
'ruby-2.1.2'
local
ruby25
=
'ruby-2.5.9'
local
ruby26
=
'ruby-2.6.7'
local
ruby27
=
'ruby-2.7.3'
local
ruby30
=
'ruby-3.0.1'
function
rb18
{
function
rb18
{
if
[
-z
"
$1
"
]
;
then
if
[
-z
"
$1
"
]
;
then
...
@@ -53,6 +57,50 @@ function rb21 {
...
@@ -53,6 +57,50 @@ function rb21 {
_rb21
()
{
compadd
`
ls
-1
$rvm_path
/gems |
grep
"^
$ruby21
@"
|
sed
-e
"s/^
$ruby21
@//"
|
awk
'{print $1}'
`
}
_rb21
()
{
compadd
`
ls
-1
$rvm_path
/gems |
grep
"^
$ruby21
@"
|
sed
-e
"s/^
$ruby21
@//"
|
awk
'{print $1}'
`
}
compdef _rb21 rb21
compdef _rb21 rb21
function
rb25
{
if
[
-z
"
$1
"
]
;
then
rvm use
"
$ruby25
"
else
rvm use
"
$ruby25
@
$1
"
fi
}
_rb25
()
{
compadd
`
ls
-1
$rvm_path
/gems |
grep
"^
$ruby25
@"
|
sed
-e
"s/^
$ruby25
@//"
|
awk
'{print $1}'
`
}
compdef _rb25 rb25
function
rb26
{
if
[
-z
"
$1
"
]
;
then
rvm use
"
$ruby26
"
else
rvm use
"
$ruby26
@
$1
"
fi
}
_rb26
()
{
compadd
`
ls
-1
$rvm_path
/gems |
grep
"^
$ruby26
@"
|
sed
-e
"s/^
$ruby26
@//"
|
awk
'{print $1}'
`
}
compdef _rb26 rb26
function
rb27
{
if
[
-z
"
$1
"
]
;
then
rvm use
"
$ruby27
"
else
rvm use
"
$ruby27
@
$1
"
fi
}
_rb27
()
{
compadd
`
ls
-1
$rvm_path
/gems |
grep
"^
$ruby27
@"
|
sed
-e
"s/^
$ruby27
@//"
|
awk
'{print $1}'
`
}
compdef _rb27 rb27
function
rb30
{
if
[
-z
"
$1
"
]
;
then
rvm use
"
$ruby30
"
else
rvm use
"
$ruby30
@
$1
"
fi
}
_rb30
()
{
compadd
`
ls
-1
$rvm_path
/gems |
grep
"^
$ruby30
@"
|
sed
-e
"s/^
$ruby30
@//"
|
awk
'{print $1}'
`
}
compdef _rb30 rb30
function
rvm-update
{
function
rvm-update
{
rvm get
head
rvm get
head
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment