about summary refs log tree commit diff
path: root/Doc/Zsh/zle.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-03-13 10:04:21 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-03-13 10:04:21 +0000
commitea291595718e1e0a6954467545cbc778d15cf16c (patch)
tree33f723b6150433df4a0602f8c0023ad59bdb916e /Doc/Zsh/zle.yo
parent1f37225708285c4e1f343c34c92064bbef68498a (diff)
downloadzsh-ea291595718e1e0a6954467545cbc778d15cf16c.tar.gz
zsh-ea291595718e1e0a6954467545cbc778d15cf16c.tar.xz
zsh-ea291595718e1e0a6954467545cbc778d15cf16c.zip
users/13902: make isearch return status useful
add LASTABORTEDSEARCH variable
Diffstat (limited to 'Doc/Zsh/zle.yo')
-rw-r--r--Doc/Zsh/zle.yo15
1 files changed, 12 insertions, 3 deletions
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index fbe3397d6..94484b9b5 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -721,10 +721,16 @@ effectively sets the maximum length of the kill ring, while the number of
 non-zero strings gives the current length, both as seen by the user at the
 command line.
 )
-
+vindex(LASTABORTEDSEARCH)
+item(tt(LASTABORTEDSEARCH) (scalar))(
+The last search string used by an interactive search that was
+aborted by the user (status 3 returned by the search widget).
+)
 vindex(LASTSEARCH)
 item(tt(LASTSEARCH) (scalar))(
-The last search string used by an interactive search ; read-only.
+The last search string used by an interactive search; read-only.
+This is set even if the search failed (status 0, 1 or 2 returned
+by the search widget), but not if it was aborted by the user.
 )
 vindex(LASTWIDGET)
 item(tt(LASTWIDGET) (scalar))(
@@ -1116,7 +1122,10 @@ item(tt(history-incremental-search-backward) (^R ^Xr) (unbound) (unbound))(
 Search backward incrementally for a specified string.  The search is
 case-insensitive if the search string does not have uppercase letters and no
 numeric argument was given.  The string may begin with `tt(^)' to anchor the
-search to the beginning of the line.
+search to the beginning of the line.  When called from a user-defined
+function returns the following statuses: 0, if the search succeeded;
+1, if the search failed; 2, if the search term was a bad pattern;
+3, if the search was aborted by the tt(send-break) command.
 
 A restricted set of editing functions
 is available in the mini-buffer.  Keys are looked up in the special