mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
add zsh completion
This commit is contained in:
parent
6d6b1d6002
commit
1700206da8
1 changed files with 20 additions and 0 deletions
20
completions/_rbenv.zsh
Normal file
20
completions/_rbenv.zsh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#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
|
||||
set-local | set-default | prefix ) _rbenv_versions ;;
|
||||
* ) _rbenv_commands ;;
|
||||
esac
|
||||
}
|
Loading…
Reference in a new issue