1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

Add an example, as a comment.

This commit is contained in:
Bart Schaefer 2006-10-16 01:08:15 +00:00
parent 38f01e72ea
commit 004d0886f1

View file

@ -74,3 +74,22 @@ return 0
# bind the caps-lock widget to it:
#
# bindkey -M main '^XL' caps-lock
# Another example of using a continuation widget to propagate accept-line
# (or any other binding from the original keymap) through the caller:
#
# bindkey -N newkeymap $KEYMAP
# recursive-edit-and-accept() {
# local -a __accepted
# zle -N newkeymap+accept-line end-recursive-edit
# zle recursive-edit -K newkeymap || zle send-break
# if [[ ${__accepted[0]} != end-recursive-edit ]]
# then zle "${__accepted[@]}"; return
# else return 0
# fi
# }
# end-recursive-edit() {
# __accepted=($WIDGET ${=NUMERIC:+-n $NUMERIC} "$@")
# zle .accept-line
# return 0
# }