From 966a330649bc99092c7a519e48efa07d7978dd40 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 10 Oct 2006 11:24:38 +0000 Subject: 22854: replace-string-again --- Doc/Zsh/contrib.yo | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Doc') diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 32fb283dc..bb03fa68a 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -1055,8 +1055,10 @@ not used. Hence it is still possible to call tt(executed-named-cmd) and similar functions while reading a value. ) tindex(replace-string) +tindex(replace-string-again) tindex(replace-pattern) -item(tt(replace-string), tt(replace-pattern))( +xitem(tt(replace-string), tt(replace-pattern)) +item(tt(replace-string-again), tt(replace-pattern-again))( The function tt(replace-string) implements two widgets. If defined under the same name as the function, it prompts for two strings; the first (source) string will be replaced by the second @@ -1082,6 +1084,13 @@ tt(:zle:replace-string)) to tt(true). In addition, a positive numeric argument forces the previous values to be offered, a negative or zero argument forces them not to be. +The function tt(replace-string-again) can be used to repeat the +previous replacement; no prompting is done. As with tt(replace-string), if +the name of the widget contains the word `tt(pattern)', pattern matching +is performed, else a literal string replacement. Note that the +previous source and replacement text are the same whether pattern or string +matching is used. + For example, starting from the line: example(print This line contains fan and fond) -- cgit 1.4.1