diff --git a/history-substring-search.zsh b/history-substring-search.zsh index 2e94c77..6a85475 100644 --- a/history-substring-search.zsh +++ b/history-substring-search.zsh @@ -173,7 +173,7 @@ _history-substring-search-begin() { # $BUFFER contains the text that is in the command-line currently. # we put an extra "\\" before meta characters such as "\(" and "\)", # so that they become "\\\(" and "\\\)" - _history_substring_search_query_escaped=${BUFFER//(#m)[\][()\\*?#<>~^]/\\$MATCH} + _history_substring_search_query_escaped=${BUFFER//(#m)[\][()|\\*?#<>~^]/\\$MATCH} # for the purpose of highlighting we will also keep a version without # doubly-escaped meta characters