diff options
author | Parth Laxmikant Kolekar <ParthKolekar@users.noreply.github.com> | 2017-11-05 08:33:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-05 08:33:23 +0300 |
commit | 7db892408fce0643687c2aa5f8d7ce80a2dfd4b6 (patch) | |
tree | 6f463e2552d0e03c7b0bd5d83e0925e33a7480c1 /powerlevel9k.zsh-theme | |
parent | 948e7f5bff288dd0b91b1d37d13b2e9bb1592f00 (diff) |
Update powerlevel9k.zsh-theme
Allow showing the number of jobs even if there is <= 1 job present.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index f33d5a9a..e8872d19 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -305,6 +305,7 @@ prompt_aws_eb_env() { # Segment to indicate background jobs with an icon. set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true +set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_EVEN_ONE false prompt_background_jobs() { local background_jobs_number=${$(jobs -l | wc -l)// /} local wrong_lines=`jobs -l | awk '/pwd now/{ count++ } END {print count}'` @@ -313,7 +314,7 @@ prompt_background_jobs() { 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 + if [[ "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE" == "true" ]] && ([[ "$background_jobs_number" -gt 1 ]] || [[ "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_EVEN_ONE" == "true" ]]); then background_jobs_number_print="$background_jobs_number" fi "$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "cyan" "$background_jobs_number_print" 'BACKGROUND_JOBS_ICON' |