Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added bash support for completion of full command line

  • Loading branch information...
commit 02332d78f38d9baef7374841d736331dc5eaff09 1 parent 6778c8e
@griff griff authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 completions/rbenv.bash
View
6 completions/rbenv.bash
@@ -5,8 +5,10 @@ _rbenv() {
if [ "$COMP_CWORD" -eq 1 ]; then
COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
else
- local command="${COMP_WORDS[1]}"
- local completions="$(rbenv completions "$command")"
+ local words=("${COMP_WORDS[@]}")
+ unset words[0]
+ unset words[$COMP_CWORD]
+ local completions=$(rbenv completions "${words[@]}")
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
fi
}
Please sign in to comment.
Something went wrong with that request. Please try again.