From b0ffc34fb83136b29e6ece5028f0fda6b1e00ee7 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Sun, 10 Jun 2018 23:35:22 -0600 Subject: [PATCH] completion should be a local var --- src/strategies/completion.zsh | 3 ++- zsh-autosuggestions.zsh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/strategies/completion.zsh b/src/strategies/completion.zsh index a23b630..847f22b 100644 --- a/src/strategies/completion.zsh +++ b/src/strategies/completion.zsh @@ -111,7 +111,8 @@ _zsh_autosuggest_capture_completion() { } _zsh_autosuggest_strategy_completion() { - typeset -g suggestion completion + typeset -g suggestion + local completion # Fetch the first completion result _zsh_autosuggest_capture_completion "$1" diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 02d4b2f..823f541 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -610,7 +610,8 @@ _zsh_autosuggest_capture_completion() { } _zsh_autosuggest_strategy_completion() { - typeset -g suggestion completion + typeset -g suggestion + local completion # Fetch the first completion result _zsh_autosuggest_capture_completion "$1"