feat(rbenv): provide completion for rbenv command (#12891)

Ref https://github.com/rbenv/rbenv/#shell-completions
This commit is contained in:
Masafumi Koba
2026-10-12 03:47:39 -07:00
committed by GitHub
parent 7d34868725
commit 417c814e2e
2 changed files with 10 additions and 1 deletions
+8 -1
View File
@@ -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