From cc921994e61fb45061977330e84bc1632fdcf1af Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Wed, 24 Feb 2016 18:35:17 -0700 Subject: [PATCH] Fix #127 by adding quotes --- src/suggestion.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/suggestion.zsh b/src/suggestion.zsh index b94031e..f8e5459 100644 --- a/src/suggestion.zsh +++ b/src/suggestion.zsh @@ -5,7 +5,7 @@ # Get a suggestion from history that matches a given prefix _zsh_autosuggest_suggestion() { - local prefix=$(_zsh_autosuggest_escape_command_prefix "$1") + local prefix="$(_zsh_autosuggest_escape_command_prefix "$1")" # Get all history items (reversed) that match pattern $prefix* local history_matches diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index c466ebc..1d21c2a 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -291,7 +291,7 @@ zle -N autosuggest-clear _zsh_autosuggest_widget_clear # Get a suggestion from history that matches a given prefix _zsh_autosuggest_suggestion() { - local prefix=$(_zsh_autosuggest_escape_command_prefix "$1") + local prefix="$(_zsh_autosuggest_escape_command_prefix "$1")" # Get all history items (reversed) that match pattern $prefix* local history_matches