pyenv/completions/rbenv.bash

15 lines
357 B
Bash
Raw Normal View History

2011-08-04 01:44:29 +00:00
_rbenv() {
COMPREPLY=()
2011-09-13 15:13:27 +00:00
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