summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Doc/Zsh/params.yo2
-rw-r--r--Functions/Zle/history-beginning-search-menu16
3 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a4795618..357a7091a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-02  Peter Stephenson  <pws@csr.com>
+
+	* unposted: Functions/Zle/history-beginning-search-menu,
+	Doc/Zsh/params.yo: yet more tweaks I'm too embarrassed to post:
+	^ also needs quoting; clear display on first non-digit character;
+	stray / appeared in substitution.
+
 2006-08-01  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 22574: Functions/Zle/history-beginning-search-menu,
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 6c637f93d..a0e520274 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -221,7 +221,7 @@ the tt(EXTENDED_GLOB) option is set, the following is sufficient to
 match an element of an array tt($array) containing exactly the value of
 tt($key):
 
-example(key2=${key//(#m)[\][+LPAR()+RPAR()\\*?#<>~]/\\$MATCH}
+example(key2=${key//(#m)[\][+LPAR()+RPAR()\\*?#<>~^]/\\$MATCH}
 print ${array[(R)$key2]})
 )
 item(tt(R))(
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]