mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 23:20:47 +00:00
Merge remote-tracking branch 'griff/morecompletion'
This commit is contained in:
commit
3ceeb72ac6
1 changed files with 4 additions and 2 deletions
|
@ -5,8 +5,10 @@ _rbenv() {
|
||||||
if [ "$COMP_CWORD" -eq 1 ]; then
|
if [ "$COMP_CWORD" -eq 1 ]; then
|
||||||
COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
|
COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
|
||||||
else
|
else
|
||||||
local command="${COMP_WORDS[1]}"
|
local words=("${COMP_WORDS[@]}")
|
||||||
local completions="$(rbenv completions "$command")"
|
unset words[0]
|
||||||
|
unset words[$COMP_CWORD]
|
||||||
|
local completions=$(rbenv completions "${words[@]}")
|
||||||
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue