From 8d4a409c8975e27fa45c1f55b1e2a077c4956726 Mon Sep 17 00:00:00 2001 From: Francisco Borges Date: Tue, 11 Dec 2018 10:21:28 +0100 Subject: [PATCH] Declare query_part as local to avoid warnings due to WARN_CREATE_GLOBAL --- zsh-history-substring-search.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh-history-substring-search.zsh b/zsh-history-substring-search.zsh index 0edf85e..3e3fbc0 100644 --- a/zsh-history-substring-search.zsh +++ b/zsh-history-substring-search.zsh @@ -321,6 +321,7 @@ _history-substring-search-end() { # highlight first matching query parts local highlight_start_index=0 local highlight_end_index=0 + local query_part for query_part in $_history_substring_search_query_parts; do local escaped_query_part=${query_part//(#m)[\][()|\\*?#<>~^]/\\$MATCH} # (i) get index of pattern