diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2016-05-04 04:59:07 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2016-05-04 04:59:07 +0300 |
commit | 0b57ee3669dd2d6d536ecff116345a929f6b068c (patch) | |
tree | 2de99e5bf87ee2c0c82e100ec471a415aa4638fa /powerlevel9k.zsh-theme | |
parent | af7d95248009e542f75aa8034c379518b71f96dc (diff) | |
parent | 1c17acb758d6f07cad1d7f76f937271830482dec (diff) |
Merge pull request #256 from cbourgeois/next
Fix incorrect background jobs number
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 224e34cc..bf313b85 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -322,6 +322,10 @@ prompt_aws_eb_env() { set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true prompt_background_jobs() { local background_jobs_number=${$(jobs -l | wc -l)// /} + local wrong_lines=`jobs -l | awk '/pwd now/{ count++ } END {print count}'` + if [[ wrong_lines -gt 0 ]]; then + background_jobs_number=$(( $background_jobs_number - $wrong_lines )) + fi if [[ background_jobs_number -gt 0 ]]; then local background_jobs_number_print="" if [[ "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE" == "true" ]] && [[ "$background_jobs_number" -gt 1 ]]; then |