69a17150ad3b594edb0d18c43371a1ca2e85edbe

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #4239 from yous/fix-linux-gems

rvm plugin: Fix `gems` to work on Linux machine

Diff

 1diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh
 2index 234ac164201c004b5d1717593a52ca6f21b2a877..53e809aaf77d219540de1d3f8616723c43b29d32 100644
 3--- a/plugins/rvm/rvm.plugin.zsh
 4+++ b/plugins/rvm/rvm.plugin.zsh
 5@@ -61,11 +61,11 @@ function gems {
 6 	local current_ruby=`rvm-prompt i v p`
 7 	local current_gemset=`rvm-prompt g`
 8 
 9-	gem list $@ | sed \
10-		-Ee "s/\([0-9, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \
11-		-Ee "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \
12-		-Ee "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
13-		-Ee "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
14+	gem list $@ | sed -E \
15+		-e "s/\([0-9, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \
16+		-e "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \
17+		-e "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
18+		-e "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
19 }
20 
21 function _rvm_completion {