Ben Wing <ben(a)666.com> writes:
I'm really trying to do this under Cygwin, but if someone has
ideas
concerning xterm, it might help too. I want zsh to change the title
bar of the window it's in whenever it runs a command.
I use zsh's precmd() and preexec() functions to do the job, like this:
if [ x$WINDOW != x ]; then
# Running under screen(1)
precmd () { print -Pn "\e]0;%n@%m:%l [W$WINDOW] [%?]\a" }
preexec () { print -Pn "\e]0;%n@%m:%l [W$WINDOW] [$1]\a" }
else
precmd () { print -Pn "\e]0;%n@%m:%l [%?]\a" }
preexec () { print -Pn "\e]0;%n@%m:%l [$1]\a" }
fi
Hope this will help you
--
lg