* Aidan Kehoe:
Ar an t-ochtú lá de mí na Nollaig, scríobh Ben Wing:
> 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.
precmd () {
echo -n \\033\]2\;$USER@$HOST:$_\\07;
}
works for XTerm and PuTTY.
using print -P in zsh gives you access to the full prompt expansion
variables listed in the zshmisc man page.
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
The many other options to print are in zshbuiltins. If you don't need the
prompt variables you can use:
cmd /c "title %USER%@%HOST%"
in the cygwin window to set the title.
-- René