Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
572b27b7
Commit
572b27b7
authored
May 28, 2011
by
Andrew Hodges
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gem List Helper
Add helper function to list gems in a pretty way (only with rvm, for now). Add missng EOF newline and a todo to the ruby plugin.
parent
9f34bbed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
ruby.plugin.zsh
plugins/ruby/ruby.plugin.zsh
+3
-2
rvm.plugin.zsh
plugins/rvm/rvm.plugin.zsh
+12
-0
No files found.
plugins/ruby/ruby.plugin.zsh
View file @
572b27b7
# TODO: Make this compatible with rvm.
# Run sudo gem on the system ruby, not the active ruby.
alias
sgem
=
'sudo gem'
# Find ruby file
alias
rfind
=
'find . -name *.rb | xargs grep -n'
\ No newline at end of file
alias
rfind
=
'find . -name *.rb | xargs grep -n'
plugins/rvm/rvm.plugin.zsh
View file @
572b27b7
...
...
@@ -38,3 +38,15 @@ function rvm-update {
function
rvm-link-completion
{
ln
-s
"
$rvm_path
/scripts/zsh/Completion/_rvm"
"
$ZSH
/plugins/rvm/_rvm.official"
}
# TODO: Make this usable w/o rvm.
function
gems
{
local
current_ruby
=
`
rvm-prompt i v p
`
local
current_gemset
=
`
rvm-prompt g
`
gem list
$@
|
sed
\
-Ee
"s/
\(
[0-9
\.
]+( .+)?
\)
/
$fg
[blue]&
$reset_color
/g"
\
-Ee
"s|
$(
echo
$rvm_path
)
|
$fg
[magenta]
\$
rvm_path
$reset_color
|g"
\
-Ee
"s/
$current_ruby
@global/
$fg
[yellow]&
$reset_color
/g"
\
-Ee
"s/
$current_ruby$current_gemset$/$fg
[green]&
$reset_color
/g"
}
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