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

Re: Getting xterm title bar to display last command...



Zoltan Hidvegi wrote:
>zle -N my-accept-line
>my-accept-line () { print -nr -- "^[]2;$BUFFER^G"; zle accept-line; }
>bindkey '^M' my-accept-line

A better way is:

xterm-accept-line () { print -nr -- "^[]2;$BUFFER^G"; zle .accept-line; }
zle -N accept-line xterm-accept-line

which replaces all instances of accept-line, rather than just '^M'.
It can be undone by

zle -A .accept-line accept-line

-zefram



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