From ccf7c29fc4f460129376fcb6b812e52cd292d4bf Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Wed, 3 Aug 2011 22:22:45 -0500 Subject: [PATCH] Simplify _rbenv_versions --- completions/rbenv.bash | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/completions/rbenv.bash b/completions/rbenv.bash index 539c05b..9110708 100644 --- a/completions/rbenv.bash +++ b/completions/rbenv.bash @@ -6,10 +6,8 @@ _rbenv_commands() { _rbenv_versions() { COMPREPLY=() - local cur=${COMP_WORDS[COMP_CWORD]} - local versions=(system $(rbenv versions --bare)) - versions="${versions[@]}" - + local cur="${COMP_WORDS[COMP_CWORD]}" + local versions="$(echo system; rbenv versions --bare)" COMPREPLY=( $( compgen -W "$versions" -- $cur ) ) }