Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #256 from cbourgeois/next
Browse files Browse the repository at this point in the history
Fix incorrect background jobs number
  • Loading branch information
bhilburn committed May 4, 2016
2 parents af7d952 + 1c17acb commit 0b57ee3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions powerlevel9k.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b57ee3

Please sign in to comment.