]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh: Use -n consistently in window name feature.
authorSimon Ruderich <simon@ruderich.org>
Tue, 31 Mar 2009 15:35:53 +0000 (17:35 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 31 Mar 2009 15:35:53 +0000 (17:35 +0200)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index e6a27ef5f85aebf98494ee68361d5daf51531f7a..69a5d4c684bbf8617efec0d4f7a62903e6d8f45c 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -192,7 +192,7 @@ if [[ $TERM == screen* || $TERM == xterm* ]]; then
 
         # Add an exclamation mark at the beginning if running with sudo or if
         # running zsh as root.
-        if [[ $program_sudo == yes || $window_root == yes ]]; then
+        if [[ -n $program_sudo || -n $window_root ]]; then
             program_name=!$program_name
         fi
 
@@ -216,7 +216,7 @@ if [[ $TERM == screen* || $TERM == xterm* ]]; then
         # Reset the window name to 'zsh'.
         if [[ -n $SSH_CONNECTION ]]; then
             window_title "@zsh"
-        elif [[ $window_root == yes ]]; then
+        elif [[ -n $window_root ]]; then
             window_title "!zsh"
         else
             window_title "zsh"