Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bindkey two functions



Joachim Reith wrote:
>I'm trying to bind two (or more) functions to one key,
>something like
>
>bindkey "^U" (end-of-line && backward-delete-char)
>
>but everything I get are messages about "undefined function"s.
>
>Is this possible?

The closest you can get at the moment is something like

bindkey -s "^U" "^E^H"

(If the functions you want to use are not already bound individually,
you will have to bind them to some out-of-the-way sequence yourself.)

In the future there will be a syntax similar to

bindkey -t "^U" end-of-line backward-delete-char

.  In the nearer future, there will be a syntax similar to

function delete-last-char {
  zle end-of-line backward-delete-char
}
zle -f delete-last-char
bindkey "^U" delete-last-char

I expect to implement this much sometime in the next few weeks (when I
can find the time).

-zefram



Messages sorted by: Reverse Date, Date, Thread, Author