about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-08-02 09:59:23 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-08-02 09:59:23 +0000
commit21c83849a91360d8af60fd253c4a808bd720f07c (patch)
treed663c0293f0878b8b6de5703489820822b37bc5e /Functions
parentbb912594b2325334a603893e90e8d9aa7cc534ca (diff)
downloadzsh-21c83849a91360d8af60fd253c4a808bd720f07c.tar.gz
zsh-21c83849a91360d8af60fd253c4a808bd720f07c.tar.xz
zsh-21c83849a91360d8af60fd253c4a808bd720f07c.zip
unposted: yet more history-beginning-search-menu fixes
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Zle/history-beginning-search-menu16
1 files changed, 8 insertions, 8 deletions
diff --git a/Functions/Zle/history-beginning-search-menu b/Functions/Zle/history-beginning-search-menu
index dadcc40cb..916639adc 100644
--- a/Functions/Zle/history-beginning-search-menu
+++ b/Functions/Zle/history-beginning-search-menu
@@ -40,7 +40,7 @@ local -a display
 
 local search=$LBUFFER
 
-search=${search//(#m)[\][()\\*?#<>~]/\\$MATCH/}
+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.
@@ -72,6 +72,12 @@ zle -R "Enter digit${${width##1}:+s}:" $display
 integer i
 local char chars
 
+# Hmmm... this isn't great.  The only way of clearing the display
+# appears to be to overwrite it completely.  I think that's because
+# displaying strings in this way doesn't set the completion list
+# properly.
+display=(${display//?/ })
+
 # Abort on first non-digit entry instead of requiring all
 # characters to be typed (as "read -k$width chars" would do).
 for (( i = 0; i < $width; i++ )); do
@@ -83,12 +89,6 @@ for (( i = 0; i < $width; i++ )); do
   chars+=$char
 done
 
-# Hmmm... this isn't great.  The only way of clearing the display
-# appears to be to overwrite it completely.  I think that's because
-# displaying strings in this way doesn't set the completion list
-# properly.
-display=(${display//?/ })
-
 if [[ $chars -eq 0 || $chars -gt $n ]]; then
   zle -R '' $display
   return 1
@@ -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]