1
0
Fork 0
mirror of https://github.com/rbenv/rbenv.git synced 2025-07-15 17:41:31 +02:00

Make zsh tab completion more resilient against user's shell configuration ()

Ensure a zsh user's prior shell options don't interfere with indexing into an array of arguments
This commit is contained in:
Richie Thomas 2022-09-15 09:59:26 -07:00 committed by GitHub
parent c4395e5820
commit a8ecfc743e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,8 @@ _rbenv() {
local words completions local words completions
read -cA words read -cA words
emulate -L zsh
if [ "${#words}" -eq 2 ]; then if [ "${#words}" -eq 2 ]; then
completions="$(rbenv commands)" completions="$(rbenv commands)"
else else