mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Fix zsh autocompletion. Closes #47.
This commit is contained in:
parent
fb6eee26d4
commit
ed9f69fe23
1 changed files with 4 additions and 5 deletions
|
@ -1,18 +1,17 @@
|
|||
#compdef _rbenv rbenv
|
||||
compctl -K _rbenv rbenv
|
||||
|
||||
function _rbenv_commands() {
|
||||
cmds_str="$(rbenv commands)"
|
||||
cmds=("${(ps:\n:)cmds_str}")
|
||||
_describe '_rbenv_commands' cmds
|
||||
reply=("${(ps:\n:)cmds_str}")
|
||||
}
|
||||
|
||||
_rbenv_versions() {
|
||||
versions_str="$(rbenv versions --bare)"
|
||||
versions=(system "${(ps:\n:)versions_str}")
|
||||
_describe '_rbenv_versions' versions
|
||||
reply=(system "${(ps:\n:)versions_str}")
|
||||
}
|
||||
|
||||
_rbenv() {
|
||||
read -cA words
|
||||
case "$words[2]" in
|
||||
set-* | global | local | shell | prefix ) _rbenv_versions ;;
|
||||
* ) _rbenv_commands ;;
|
||||
|
|
Loading…
Reference in a new issue