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:
14
completions/pyenv.bash
Normal file
14
completions/pyenv.bash
Normal 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
19
completions/pyenv.zsh
Normal 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}")
|
||||
}
|
||||
Reference in New Issue
Block a user