From: Simon Ruderich Date: Tue, 30 Mar 2010 22:49:32 +0000 (+0200) Subject: zsh/rc: Fix window_precmd() when running zsh as root through ssh. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=22247354cceff65512811106f28f81861c49a62c;p=config%2Fdotfiles.git zsh/rc: Fix window_precmd() when running zsh as root through ssh. --- diff --git a/zsh/rc b/zsh/rc index 7ccbe91..ef32525 100644 --- a/zsh/rc +++ b/zsh/rc @@ -326,13 +326,13 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then fi # Prepend prefixes like in window_preexec(). + if [[ -n $window_root ]]; then + name="!$name" + fi if [[ -n $SSH_CONNECTION ]]; then - window_title "@$name" - elif [[ -n $window_root ]]; then - window_title "!$name" - else - window_title $name + name="@$name" fi + window_title $name # Just reset the name, so no screen reset necessary for the moment. window_reset=