escape | in search query before scanning history

https://github.com/robbyrussell/oh-my-zsh/pull/215#issuecomment-1422348
This commit is contained in:
Guido van Steen
2011-06-23 09:34:23 -07:00
committed by Suraj N. Kurapati
parent 654b080cd6
commit 9dffcab6f6
+1 -1
View File
@@ -173,7 +173,7 @@ _history-substring-search-begin() {
# $BUFFER contains the text that is in the command-line currently. # $BUFFER contains the text that is in the command-line currently.
# we put an extra "\\" before meta characters such as "\(" and "\)", # we put an extra "\\" before meta characters such as "\(" and "\)",
# so that they become "\\\(" 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 # for the purpose of highlighting we will also keep a version without
# doubly-escaped meta characters # doubly-escaped meta characters