From fb5e7e65c22c75803e98616425306a2a29c2c46e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 3 Aug 2009 13:02:08 +0200 Subject: [PATCH] zsh: Add support for rxvt. --- zsh/rc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zsh/rc b/zsh/rc index c95c376..4712a05 100644 --- a/zsh/rc +++ b/zsh/rc @@ -150,8 +150,8 @@ if [[ $ZSH_VERSION == (4.3.<9->|4.<4->*|<5->*) || 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'. @@ -164,7 +164,7 @@ fi # 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 @@ -249,7 +249,7 @@ if [[ $TERM == screen* || $TERM == xterm* ]]; then 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\\" @@ -260,7 +260,7 @@ if [[ $TERM == screen* || $TERM == xterm* ]]; then 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 } -- 2.45.2