pyenv/completions/rbenv.zsh

20 lines
321 B
Bash
Raw Normal View History

if [[ ! -o interactive ]]; then
return
fi
2011-09-10 20:09:27 -05:00
compctl -K _rbenv rbenv
2011-08-16 12:39:38 +08:00
_rbenv() {
2011-09-13 13:12:04 -05:00
local word words completions
2011-09-10 20:09:27 -05:00
read -cA words
2011-09-13 13:12:04 -05: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 12:39:38 +08:00
}