From 01621d2e1a9069cc919a46d6fbf87dfdeaeb552a Mon Sep 17 00:00:00 2001 From: "Jesse B. Hannah" Date: Fri, 1 Feb 2013 17:40:49 -0700 Subject: [PATCH] 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. --- plugins/rvm/rvm.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 1ab800b0f..9f23f47f6 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -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 {