# 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
# 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"