mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-28 19:33:03 +01:00
feat(rbenv): provide completion for rbenv command (#12891)
Ref https://github.com/rbenv/rbenv/#shell-completions
This commit is contained in:
1 parent
7d34868725
commit
417c814e2e
2 files changed
+10
-1
No files matched your search
@@ -24,6 +24,13 @@ if [[ $FOUND_RBENV -ne 1 ]]; then
|
||||
fi
|
||||
|
||||
if [[ $FOUND_RBENV -eq 1 ]]; then
|
||||
rbenv_completions="${commands[rbenv]:A:h:h}/completions"
|
||||
if [[ -f "$rbenv_completions/_rbenv" ]]; then
|
||||
fpath+=("$rbenv_completions")
|
||||
autoload -Uz _rbenv
|
||||
compdef _rbenv rbenv
|
||||
fi
|
||||
|
||||
eval "$(rbenv init --no-rehash - zsh)"
|
||||
|
||||
alias rubies="rbenv versions"
|
||||
@@ -65,4 +72,4 @@ else
|
||||
}
|
||||
fi
|
||||
|
||||
unset FOUND_RBENV rbenvdirs dir
|
||||
unset FOUND_RBENV rbenvdirs dir rbenv_completions
|
||||
Reference in new issue
Block a user