mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
speed up background_jobs
This commit is contained in:
parent
51def07661
commit
ac04d7b952
1 changed files with 5 additions and 6 deletions
|
@ -318,12 +318,11 @@ prompt_aws_eb_env() {
|
||||||
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true
|
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true
|
||||||
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS false
|
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS false
|
||||||
prompt_background_jobs() {
|
prompt_background_jobs() {
|
||||||
local n && n="${(fw)#$(jobs -d)}" && ((n > 1)) || return
|
local -i n=${(%)${:-%j}}
|
||||||
(( n /= 2 ))
|
(( n )) || return
|
||||||
|
local prompt
|
||||||
local prompt=''
|
if [[ $POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE == true &&
|
||||||
if [[ "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE" == "true" &&
|
($n -gt 1 || $POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS == true) ]]; then
|
||||||
("$n" -gt 1 || "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS" == "true") ]]; then
|
|
||||||
prompt=$n
|
prompt=$n
|
||||||
fi
|
fi
|
||||||
"$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "cyan" "$prompt" 'BACKGROUND_JOBS_ICON'
|
"$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "cyan" "$prompt" 'BACKGROUND_JOBS_ICON'
|
||||||
|
|
Loading…
Reference in a new issue