diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-03-18 23:19:59 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-03-18 23:19:59 +0000 |
commit | 4beedf221eee5a8f4ae659fccd6f36c96c66cc69 (patch) | |
tree | 887d4c1f1f8dd1d9cfc5408b3c9c22020b0a774d /Doc/Zsh | |
parent | 298de9ddb1ec77a23c7fb64e68f5ad404fbe74d3 (diff) | |
download | zsh-4beedf221eee5a8f4ae659fccd6f36c96c66cc69.tar.gz zsh-4beedf221eee5a8f4ae659fccd6f36c96c66cc69.tar.xz zsh-4beedf221eee5a8f4ae659fccd6f36c96c66cc69.zip |
Merge of trunk updates workers/20708 and workers/22854.
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/contrib.yo | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 2686d2983..1765918e0 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -794,8 +794,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 @@ -814,6 +816,20 @@ replaced by the var(N)th parenthesised expression matched. The form `tt(\{)var(N)tt(})' may be used to protect the digit from following digits. +By default the previous source or replacement string will not be offered +for editing. However, this feature can be activated by setting the style +tt(edit-previous) in the context tt(:zle:)var(widget) (for example, +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) |