From 738cadb50fcf7d823564300169a33bf2f348aa26 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Wed, 10 Oct 2012 13:56:46 -0700 Subject: [PATCH] Minor tweaks - Proper conditional expression for printing XTerm titlebar stuff - Local variables in precmd_flags_rprompt --- zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index deb75b3..3356813 100644 --- a/zshrc +++ b/zshrc @@ -33,7 +33,7 @@ prompt_newline() precmd_xterm_title() { # Set xterm and screen titles - [ -n $DISPLAY ] && print -Pn "\e]2;%n@%m\a" + [[ -n "$DISPLAY" ]] && print -Pn "\e]2;%n@%m\a" } precmd_prompt() @@ -66,14 +66,14 @@ precmd_git_branch() precmd_flags_rprompt() { + local bgjob + local cmdstat if (is-at-least '4.3.7'); then bgjob="%(1j.[%B%F{magenta}%j%F{default}%b].)" cmdstat="%(0?..[%B%F{red}%?%F{default}%b])" - isroot="%(!.%B%F{red}%#%F{default}%b.%#)" else bgjob="%(1j.[%{$fg_bold[magenta]%}%j%{$reset_color%}].)" cmdstat="%(0?..[%{$fg_bold[red]%}%?%{$reset_color%}])" - isroot="%(!.%{$fg_bold[red]%}%#%{$reset_color%}.%#)" fi RPROMPT="$cmdstat$bgjob"