pyenv/completions/rbenv.zsh

20 lines
321 B
Bash
Raw Normal View History

if [[ ! -o interactive ]]; then
return
fi
2011-09-10 21:09:27 -04:00
compctl -K _rbenv rbenv
2011-08-16 00:39:38 -04:00
_rbenv() {
2011-09-13 14:12:04 -04:00
local word words completions
2011-09-10 21:09:27 -04:00
read -cA words
2011-09-13 14:12:04 -04:00
word="${words[2]}"
if [ "${#words}" -eq 2 ]; then
completions="$(rbenv commands)"
else
completions="$(rbenv completions "${word}")"
fi
reply=("${(ps:\n:)completions}")
2011-08-16 00:39:38 -04:00
}