mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-11-11 03:01:51 -05:00
feat(rbenv): provide completion for rbenv command (#12891)
Ref https://github.com/rbenv/rbenv/#shell-completions
This commit is contained in:
@@ -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