Add proper pyenv support to fish

This commit is contained in:
Colin Powell
2018-12-07 13:40:10 -05:00
parent 574abe6975
commit ce96d464e3
6 changed files with 50 additions and 49 deletions

View File

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