mirror of
https://github.com/rbenv/rbenv.git
synced 2024-12-29 13:15:42 +01:00
Added bash support for completion of full command line
This commit is contained in:
parent
6778c8e905
commit
02332d78f3
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue