pyenv/completions/rbenv.zsh
2011-09-10 20:13:42 -05:00

19 lines
391 B
Bash

compctl -K _rbenv rbenv
function _rbenv_commands() {
local cmds_str="$(rbenv commands)"
reply=("${(ps:\n:)cmds_str}")
}
_rbenv_versions() {
local versions_str="$(rbenv versions --bare)"
reply=(system "${(ps:\n:)versions_str}")
}
_rbenv() {
read -cA words
case "$words[2]" in
set-* | global | local | shell | prefix ) _rbenv_versions ;;
* ) _rbenv_commands ;;
esac
}