Permalink
Browse files

fixed gemset completion function .

  • Loading branch information...
1 parent e323022 commit f78e80c0f829edb805db938ca021b2a3715f1564 @byplayer byplayer committed Mar 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 scripts/zsh/Completion/_rvm
@@ -57,7 +57,7 @@ case $state in
# Construct a full version string for each of the gemsets.
# Eg, 1.9.2@min 1.9.2@rail3 …
_values -S , 'gemsets' \
- $(rvm ${line[CURRENT-1]%%@*} gemset list | awk '/^[-_[:alnum:]]+$/ {print "'${line[CURRENT-1]%%@*}'@"$1}')
+ $(rvm ${line[CURRENT-1]%%@*} gemset list | awk '/^[ -_[:alnum:]]+$/ {print "'${line[CURRENT-1]%%@*}'@"$1}')
fi
fi
;;
@@ -73,7 +73,7 @@ case $state in
_values 'gemset_commands' $(rvm gemset | sed -e '/create/!d; s/^.*[{]\(.*\)[}].*$/\1/; s/,/ /g')
else
#_values -S , 'gemsets' $(rvm gemset list | \grep -v gemset 2>/dev/null)
- _values -S , 'gemsets' $(rvm gemset list | \grep -Ev '(gemset|info)' 2>/dev/null)
+ _values -S , 'gemsets' $(rvm gemset list | \grep -Ev '(gemset|info)' 2>/dev/null | awk '/^[ -_[:alnum:]]+$/ {print '$1'}')
fi
ret=0
;;

0 comments on commit f78e80c

Please sign in to comment.