mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Fix gems helper command to work with GNU sed
Repeating the -E flag fails with GNU sed (brings up the usage/help description). This fixes the gems helper command with GNU sed (Linux) without breaking BSD sed (OS X) compatibility.
This commit is contained in:
parent
615e41b0ec
commit
01621d2e1a
1 changed files with 5 additions and 5 deletions
|
|
@ -38,11 +38,11 @@ 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"
|
||||
gem list $@ | sed -E \
|
||||
-e "s/\([0-9, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \
|
||||
-e "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \
|
||||
-e "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
|
||||
-e "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
|
||||
}
|
||||
|
||||
function _rvm_completion {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue