diff --git a/shells/common/prompt.sh b/shells/common/prompt.sh index cb9b51f..d529207 100644 --- a/shells/common/prompt.sh +++ b/shells/common/prompt.sh @@ -17,3 +17,11 @@ function user_at_host() { echo $str } + +function prompt_bg_job() { + if [ "$CURRENT_SHELL" = "zsh" ]; then + jobs | grep '+' | awk '{print $4}' + else + jobs | grep '+' | awk '{print $3}' + fi +}