From a8ecfc743e74359334cdc82654adf1ffba9ea0e9 Mon Sep 17 00:00:00 2001 From: Richie Thomas Date: Thu, 15 Sep 2022 09:59:26 -0700 Subject: [PATCH] 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 --- completions/rbenv.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/completions/rbenv.zsh b/completions/rbenv.zsh index 5b23d42f..e6564cfd 100644 --- a/completions/rbenv.zsh +++ b/completions/rbenv.zsh @@ -8,6 +8,8 @@ _rbenv() { local words completions read -cA words + emulate -L zsh + if [ "${#words}" -eq 2 ]; then completions="$(rbenv commands)" else