From: Andrew Lorimer Date: Thu, 23 May 2019 08:07:46 +0000 (+1000) Subject: fix job indicator in prompt X-Git-Url: https://git.lorimer.id.au/dotfiles.git/diff_plain/3ad9727d87254d02c9f26429532cfa3516b352a6?ds=sidebyside fix job indicator in prompt --- diff --git a/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme b/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme index e5d4869..ac0f295 100644 --- a/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme +++ b/zsh/.oh-my-zsh/custom/themes/custom.zsh-theme @@ -66,6 +66,8 @@ if [[ "$SSH_CLIENT" ]]; then fi # Check for suspended processes -[[ $(jobs -l | wc -l) -gt 0 ]] && symbols="%{$color4%}● " +checkjobs() { + [[ $(jobs -l | wc -l) -gt 0 ]] && echo "%{$color4%}● " +} -PROMPT=$'$symbols$context%{%f%}%~%{%f%} ${vcs_info_msg_0_/master/} %(?.%{$color0%}.%{$color3%})%(!.#.❯)%{%f%} ' +PROMPT=$'$(checkjobs)%{$symbols%}%{$context%}%{%f%}%~%{%f%} ${vcs_info_msg_0_/master/} %(?.%{$color0%}.%{$color3%})%(!.#.❯)%{%f%} '