From: Simon Ruderich Date: Tue, 31 Mar 2009 15:35:53 +0000 (+0200) Subject: zsh: Use -n consistently in window name feature. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;ds=sidebyside;h=63879ee81a4d7296ddfe47301d616ff50e643a0d;p=config%2Fdotfiles.git zsh: Use -n consistently in window name feature. --- diff --git a/zsh/rc b/zsh/rc index e6a27ef..69a5d4c 100644 --- 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"