diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2002-03-05 16:33:19 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2002-03-05 16:33:19 +0000 |
commit | 849f4068de9831fdaa635c2372dada9131fb5a39 (patch) | |
tree | b1d1696df228fc9c34412920f74d03e1794eba8b /Doc/Zsh/contrib.yo | |
parent | 15630b234ad7d2e91b165ba0bf584ee0e6e6efce (diff) | |
download | zsh-849f4068de9831fdaa635c2372dada9131fb5a39.tar.gz zsh-849f4068de9831fdaa635c2372dada9131fb5a39.tar.xz zsh-849f4068de9831fdaa635c2372dada9131fb5a39.zip |
16767: Src/Zle/zle_hist.c, Doc/Zsh/zle.yo, Doc/Zsh/contrib.yo,
Functions/Zle/copy-earlier-word: Enhance insert-last-word to pick different lines from the history (including the current line) and different words from that line. Add copy-earlier-word as suggested by Dominik Vogt to copy words from either the current line, or (following an insert-last-word) a previous history line.
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r-- | Doc/Zsh/contrib.yo | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 654fa699c..21997b7d8 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -524,6 +524,20 @@ example(zle -N insert-last-assignment smart-insert-last-word zstyle :insert-last-assignment match '[[:alpha:]][][[:alnum:]]#=*' bindkey '\e=' insert-last-assignment) ) +findex(copy-earlier-word) +item(tt(copy-earlier-word))( +This widget works like a combination of tt(insert-last-word) and +tt(copy-prev-shell-word). Repeated invocations of the widget retrieve +earlier words on the relevant history line. With a numeric argument +var(N), insert the var(N)th word from the history line; var(N) may be +negative to count from the end of the line. + +If tt(insert-last-word) has been used to retrieve the last word on a +previous history line, repeated invocations will replace that word with +earlier words from the same line. + +Otherwise, the widget applies to words on the line currently being edited. +) enditem() subsect(Styles) |