mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
14 lines
357 B
Bash
14 lines
357 B
Bash
_rbenv() {
|
|
COMPREPLY=()
|
|
local word="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
if [ "$COMP_CWORD" -eq 1 ]; then
|
|
COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
|
|
else
|
|
local command="${COMP_WORDS[1]}"
|
|
local completions="$(rbenv completions "$command")"
|
|
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
|
fi
|
|
}
|
|
|
|
complete -F _rbenv rbenv
|