about summary refs log tree commit diff
path: root/Doc/Zsh/contrib.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-07-29 14:21:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-07-29 14:21:57 +0000
commitefe2876d927b5d028031a6023b622be44c5d5b8a (patch)
treeb2bf41f0a9d4d29850b748948d04706dbde8b566 /Doc/Zsh/contrib.yo
parente1d8ca1d70053e44c3e4950ceafe3f07e6e67d0d (diff)
downloadzsh-efe2876d927b5d028031a6023b622be44c5d5b8a.tar.gz
zsh-efe2876d927b5d028031a6023b622be44c5d5b8a.tar.xz
zsh-efe2876d927b5d028031a6023b622be44c5d5b8a.zip
20219: make zle parameter HISTNO writeable
add history-pattern-search widget
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r--Doc/Zsh/contrib.yo19
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index d205cce93..71867be2e 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -591,6 +591,25 @@ zle -N history-beginning-search-forward-end \
 bindkey '\e^P' history-beginning-search-backward-end
 bindkey '\e^N' history-beginning-search-forward-end)
 )
+tindex(history-pattern-search)
+tindex(history-pattern-search-backward)
+tindex(history-pattern-search-forward)
+item(tt(history-pattern-search))(
+The function tt(history-pattern-search) implements widgets which prompt
+for a pattern with which to search the history backwards or forwards.  The
+pattern is in the usual zsh format, however the first character may be
+tt(^) to anchor the search to the start of the line, and the last character
+may be tt($) to anchor the search to the end of the line.  If the
+search was not anchored to the end of the line the cursor is positioned
+just after the pattern found.
+
+The commands to create bindable widgets are similar to those in the
+example immediately above:
+
+example(autoload -U history-pattern-search
+zle -N history-pattern-search-backward history-pattern-search
+zle -N history-pattern-search-forward history-pattern-search)
+)
 tindex(up-line-or-beginning-search)
 tindex(down-line-or-beginning-search)
 item(tt(up-line-or-beginning-search), tt(down-line-or-beginning-search))(