pyenv/completions/rbenv.zsh

19 lines
300 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() {
local words completions
2011-09-11 01:09:27 +00:00
read -cA words
2011-09-13 18:12:04 +00:00
if [ "${#words}" -eq 2 ]; then
completions="$(rbenv commands)"
else
completions="$(rbenv completions ${words[2,-2]})"
2011-09-13 18:12:04 +00:00
fi
reply=("${(ps:\n:)completions}")
2011-08-16 04:39:38 +00:00
}