From 6e612155ea1fb20ad36aa4aabfade6a2b14572eb Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Mon, 29 Oct 2012 18:47:32 -0500 Subject: [PATCH] Added indicator of suspended job to RPROMPT --- zsh/prompt.zsh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index 60db43b..d030fe6 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.zsh @@ -38,9 +38,18 @@ need_push() { fi } +suspended_jobs() { + sj=$(jobs 2>/dev/null | tail -n 1) + if [[ $sj == "" ]]; then + echo "" + else + echo "%{$FG[208]%}✱%{$reset_color%}" + fi +} + directory_name(){ echo "%{$fg_bold[cyan]%}%1/%\/%{$reset_color%}" } export PROMPT=$'%{$FG[199]%}♥%{$reset_color%} $(directory_name) %{$fg_bold[magenta]%}➜%{$reset_color%} ' -export RPROMPT=$'$(git_dirty)$(need_push)' +export RPROMPT=$'$(git_dirty)$(need_push)$(suspended_jobs)'