1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-08 11:33:49 -05:00

created new project.

modified rbenv source for Python and renamed to pyenv.
This commit is contained in:
Yamashita Yuu
2012-08-31 15:23:41 +09:00
commit 2457419b4a
30 changed files with 1139 additions and 0 deletions

14
completions/pyenv.bash Normal file
View File

@@ -0,0 +1,14 @@
_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

19
completions/pyenv.zsh Normal file
View File

@@ -0,0 +1,19 @@
if [[ ! -o interactive ]]; then
return
fi
compctl -K _pyenv pyenv
_pyenv() {
local word words completions
read -cA words
word="${words[2]}"
if [ "${#words}" -eq 2 ]; then
completions="$(pyenv commands)"
else
completions="$(pyenv completions "${word}")"
fi
reply=("${(ps:\n:)completions}")
}