Declare query_part as local to avoid warnings due to WARN_CREATE_GLOBAL

This commit is contained in:
Francisco Borges 2018-12-11 10:21:28 +01:00
parent 47a7d416c6
commit 8d4a409c89
No known key found for this signature in database
GPG key ID: 89E2B124EB9F423B

View file

@ -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