1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-13 22:03:52 -05:00

Merge remote-tracking branch 'griff/morecompletion'

This commit is contained in:
Sam Stephenson
2012-12-28 12:43:30 -06:00

View File

@@ -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
}