mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
19 lines
391 B
Bash
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
|
|
}
|