pyenv/completions/rbenv.zsh

21 lines
428 B
Bash
Raw Normal View History

2011-08-16 00:39:38 -04:00
#compdef _rbenv rbenv
function _rbenv_commands() {
cmds_str="$(rbenv commands)"
cmds=("${(ps:\n:)cmds_str}")
_describe '_rbenv_commands' cmds
}
_rbenv_versions() {
versions_str="$(rbenv versions --bare)"
versions=(system "${(ps:\n:)versions_str}")
_describe '_rbenv_versions' versions
}
_rbenv() {
case "$words[2]" in
2011-08-18 15:32:33 -04:00
set-* | global | local | prefix ) _rbenv_versions ;;
2011-08-16 00:39:38 -04:00
* ) _rbenv_commands ;;
esac
}