From: Simon Ruderich Date: Mon, 3 Aug 2009 11:02:08 +0000 (+0200) Subject: zsh: Add support for rxvt. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;ds=sidebyside;h=fb5e7e65c22c75803e98616425306a2a29c2c46e;p=config%2Fdotfiles.git zsh: Add support for rxvt. --- 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 }