From 22247354cceff65512811106f28f81861c49a62c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 31 Mar 2010 00:49:32 +0200 Subject: [PATCH] zsh/rc: Fix window_precmd() when running zsh as root through ssh. --- zsh/rc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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= -- 2.44.2