mirror of
https://github.com/zsh-users/zsh-history-substring-search.git
synced 2026-11-11 11:41:49 -05:00
escape | in search query before scanning history
https://github.com/robbyrussell/oh-my-zsh/pull/215#issuecomment-1422348
This commit is contained in:
committed by
Suraj N. Kurapati
parent
654b080cd6
commit
9dffcab6f6
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user