fi
fi
-# When screen or xterm is used set the name of the window to the currently
-# running program.
+# When screen, xterm or rxvt is used set the name of the window to the
+# currently running program.
#
# When a program is started preexec() sets the window's name to it; when it
# stops precmd() resets the window's name to 'zsh'.
# added at the beginning of the command to make this clear. If a command is
# running on a different computer with ssh a @ is added at the beginning. This
# only works if the .zshrc on the server also uses this command.
-if [[ $TERM == screen* || $TERM == xterm* ]]; then
+if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then
# Is set to a non empty value to reset the window name in the next
# precmd() call.
window_reset=yes
window_reset=
}
- # Sets the window title. Works with screen and xterm.
+ # Sets the window title. Works with screen, xterm and rxvt.
window_title() {
if [[ $TERM == screen* ]]; then
print -n "\ek$1\e\\"
echo "$1" | stumpish -e "title" > /dev/null
fi
- elif [[ $TERM == xterm* ]]; then
+ elif [[ $TERM == xterm* || $TERM == rxvt* ]]; then
print -n "\e]2;$1\e\\"
fi
}