mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-19 05:51:57 +00:00
Merge pull request #256 from cbourgeois/next
Fix incorrect background jobs number
This commit is contained in:
commit
0b57ee3669
1 changed files with 4 additions and 0 deletions
|
@ -322,6 +322,10 @@ prompt_aws_eb_env() {
|
||||||
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true
|
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true
|
||||||
prompt_background_jobs() {
|
prompt_background_jobs() {
|
||||||
local background_jobs_number=${$(jobs -l | wc -l)// /}
|
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
|
if [[ background_jobs_number -gt 0 ]]; then
|
||||||
local background_jobs_number_print=""
|
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 ]]; then
|
||||||
|
|
Loading…
Reference in a new issue