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

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



> Okay, so I have the neat function from the zsh web site to get my xterm to
> display the current directory....Anyone know how to use that basic idea to
> get my xterm to display the last thing entered at the command line
> instead?

In zsh-3.1.2 (coming soon), thanks to Zefram, you can do:

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

Note that you have to type real ESC and CTRL-G instead of ^[ and ^G.  In
zsh-3.0, and probably in zsh-3.1.1 too, there is no way to do that.

Zoltan



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