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

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
read -cA words
emulate -L zsh
if [ "${#words}" -eq 2 ]; then
completions="$(rbenv commands)"
else