mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
15585: bash-style up- and down-case words
This commit is contained in:
parent
34def9b74d
commit
5dd1ba01ea
4 changed files with 29 additions and 2 deletions
|
@ -1,5 +1,9 @@
|
|||
2001-08-07 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 15585: Doc/Zsh/contrib.yo, Functions/Zle/bash-down-case-word,
|
||||
Functions/Zle/bash-up-case-word: two new Zle functions with
|
||||
bash-style word boundaries.
|
||||
|
||||
* 15583: Config/installfns.sh: ignore CVS directories for
|
||||
all function installations, not just with subdirectories.
|
||||
|
||||
|
|
|
@ -366,9 +366,12 @@ tindex(bash-forward-word)
|
|||
tindex(bash-backward-word)
|
||||
tindex(bash-kill-word)
|
||||
tindex(bash-backward-kill-word)
|
||||
tindex(bash-transpowse-words)
|
||||
tindex(bash-transpose-words)
|
||||
tindex(bash-up-case-word)
|
||||
tindex(bash-down-case-word)
|
||||
xitem(tt(bash-forward-word), tt(bash-backward-word))
|
||||
xitem(tt(bash-kill-word), tt(bash-backward-kill-word))
|
||||
xitem(tt(bash-up-case-word), tt(bash-down-case-word))
|
||||
item(tt(bash-transpose-words))(
|
||||
These work similarly to the corresponding builtin zle functions without the
|
||||
`tt(bash-)' prefix, but a word is considered to consist of alphanumeric
|
||||
|
@ -376,7 +379,9 @@ characters only. If you wish to replace your existing bindings with these
|
|||
four widgets, the following is sufficient:
|
||||
|
||||
example(for widget in kill-word backward-kill-word \
|
||||
forward-word backward-word transpose-words; do
|
||||
forward-word backward-word \
|
||||
up-case-word down-case-word \
|
||||
transpose-words; do
|
||||
autoload bash-$widget
|
||||
zle -N $widget bash-$widget
|
||||
done)
|
||||
|
|
9
Functions/Zle/bash-down-case-word
Normal file
9
Functions/Zle/bash-down-case-word
Normal file
|
@ -0,0 +1,9 @@
|
|||
# This implements a bash-style down-case-word.
|
||||
# To use,
|
||||
# zle -N bash-down-case-word
|
||||
# bindkey '...' bash-down-case-word
|
||||
# or if you wish to replace existing down-case-word bindings,
|
||||
# zle -N down-case-word bash-down-case-word
|
||||
|
||||
local WORDCHARS=''
|
||||
zle .down-case-word
|
9
Functions/Zle/bash-up-case-word
Normal file
9
Functions/Zle/bash-up-case-word
Normal file
|
@ -0,0 +1,9 @@
|
|||
# This implements a bash-style up-case-word.
|
||||
# To use,
|
||||
# zle -N bash-up-case-word
|
||||
# bindkey '...' bash-up-case-word
|
||||
# or if you wish to replace existing up-case-word bindings,
|
||||
# zle -N up-case-word bash-up-case-word
|
||||
|
||||
local WORDCHARS=''
|
||||
zle .up-case-word
|
Loading…
Reference in a new issue