pyenv/completions/pyenv.bash
Yamashita Yuu 2457419b4a created new project.
modified rbenv source for Python and renamed to pyenv.
2012-08-31 15:30:20 +09:00

14 lines
357 B
Bash

_pyenv() {
COMPREPLY=()
local word="${COMP_WORDS[COMP_CWORD]}"
if [ "$COMP_CWORD" -eq 1 ]; then
COMPREPLY=( $(compgen -W "$(pyenv commands)" -- "$word") )
else
local command="${COMP_WORDS[1]}"
local completions="$(pyenv completions "$command")"
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
fi
}
complete -F _pyenv pyenv