diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 07546fd34..5a44864db 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -29,6 +29,7 @@ # A few utility functions to make it easy and re-usable to draw segmented prompts CURRENT_BG='NONE' +zmodload zsh/parameter # Special Powerline characters @@ -207,7 +208,7 @@ prompt_status() { symbols=() [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" - [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" + [[ ${#jobstates} -ne 0 ]] && symbols+="%{%F{cyan}%}⚙" [[ -n "$symbols" ]] && prompt_segment black default "$symbols" }