about summary refs log tree commit diff
path: root/Functions/Zle/history-beginning-search-menu
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-08-01 20:28:35 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-08-01 20:28:35 +0000
commit7d77bc95b2ba7276cf430a989e9b4000c72ba765 (patch)
treec86eb5720ff5fe902aebf1d76d6ba4260dcc5352 /Functions/Zle/history-beginning-search-menu
parentba22472b7f16b696cc4251fab090652d31308e66 (diff)
downloadzsh-7d77bc95b2ba7276cf430a989e9b4000c72ba765.tar.gz
zsh-7d77bc95b2ba7276cf430a989e9b4000c72ba765.tar.xz
zsh-7d77bc95b2ba7276cf430a989e9b4000c72ba765.zip
22574: more history-beginning-search-menu fixes
Diffstat (limited to 'Functions/Zle/history-beginning-search-menu')
-rw-r--r--Functions/Zle/history-beginning-search-menu4
1 files changed, 2 insertions, 2 deletions
diff --git a/Functions/Zle/history-beginning-search-menu b/Functions/Zle/history-beginning-search-menu
index 46a6a776b..dadcc40cb 100644
--- a/Functions/Zle/history-beginning-search-menu
+++ b/Functions/Zle/history-beginning-search-menu
@@ -40,12 +40,12 @@ local -a display
 
 local search=$LBUFFER
 
+search=${search//(#m)[\][()\\*?#<>~]/\\$MATCH/}
 if [[ $WIDGET = *-space* ]]; then
   # We need to quote metacharacters in the search string
   # since they are otherwise active in the reverse subscript.
   # We need to avoid quoting other characters since they aren't
   # and just stay quoted, rather annoyingly.
-  search=${search//(#m)[\][()\\*?#<>]/\\$MATCH/}
   search=${search// /*}
 fi
 
@@ -112,7 +112,7 @@ fi
 # go to the last one.  This allows accept-line-and-down-history etc.
 # to work.
 local -a lines
-local matchq=${matches[$chars]//(#m)[\][()\\*?#<>]/\\$MATCH}
+local matchq=${matches[$chars]//(#m)[\][()\\*?#<>~]/\\$MATCH}
 lines=(${(kon)history[(R)$matchq]})
 HISTNO=$lines[-1]