1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-22 15:21:56 +00:00

remove unnecessary caching

This commit is contained in:
romkatv 2019-03-04 18:12:11 +01:00
parent 05177a8230
commit 00bc22e194

View file

@ -408,16 +408,12 @@ prompt_background_jobs() {
local n && n="${(fw)#$(jobs -rd)}" && ((n > 1)) || return local n && n="${(fw)#$(jobs -rd)}" && ((n > 1)) || return
(( n /= 2 )) (( n /= 2 ))
local cache_key="$0 $n" local prompt=''
if ! _p9k_cache_get $cache_key; then
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
_p9k_cache_set $cache_key $n prompt=$n
else
_p9k_cache_set $cache_key ''
fi fi
fi "$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "cyan" "$prompt" 'BACKGROUND_JOBS_ICON'
"$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "cyan" "$_P9K_RETVAL" 'BACKGROUND_JOBS_ICON'
} }
################################################################ ################################################################