I can change the terminal's title manually by running..
print -Pn "\e]0;%n@%m: %~\a"
Which gets the terminals title how I want it to be, however, it doesn't track things as I go along.
Using Zsh's preexec and precmd, I can get it to change the title of the screen's window, but for some reason, the same command doesn't change the title of the window (only if I run it manually from the shell)
I can change the terminal's title manually by running..
Which gets the terminals title how I want it to be, however, it doesn't track things as I go along.
Using Zsh's preexec and precmd, I can get it to change the title of the screen's window, but for some reason, the same command doesn't change the title of the window (only if I run it manually from the shell)
precmd () {
screen- bce|screen)
print -Pn "\e]0;%n@%m: %~\a"
print -Pn "\ekzsh: %~\e\\"
xterm* |rxvt)
print -Pn "\e]0;%n@%m: %~\a"
case $TERM in
;;
;;
esac
}
preexec () {
screen- bce|screen)
print -Pn "\e]0;%n@%m: $1\a"
print -Pn "\ek$1\e\\"
xterm* |rxvt)
print -Pn "\e]0;%n@%m: $1\a"
case $TERM in
;;
;;
esac
}