escape | in search query before scanning history
https://github.com/robbyrussell/oh-my-zsh/pull/215#issuecomment-1422348
This commit is contained in:
parent
654b080cd6
commit
9dffcab6f6
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue