Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix gems helper command to work with GNU sed #1579

Closed
wants to merge 1 commit into from

2 participants

@jbhannah

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. Supersedes #411.

@jbhannah jbhannah 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.
01621d2
@jbhannah jbhannah referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 2, 2013
  1. @jbhannah

    Fix gems helper command to work with GNU sed

    jbhannah authored
    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 page is out of date. Refresh to see the latest.
Showing with 5 additions and 5 deletions.
  1. +5 −5 plugins/rvm/rvm.plugin.zsh
View
10 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 {
Something went wrong with that request. Please try again.