pyenv/completions/rbenv.zsh

20 lines
321 B
Bash
Raw Normal View History

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