aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-03-04 20:12:11 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-03-04 20:12:23 +0300
commit00bc22e194ec1f2f6fd00f76218af182c600c505 (patch)
tree91ae00d785a4d6a70c057553dba99bcdf41c2c20 /powerlevel9k.zsh-theme
parent05177a82309d186d68283fb1dbc7e640b82547e3 (diff)
remove unnecessary caching
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme14
1 files changed, 5 insertions, 9 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index bf12b2dc..341985f3 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -408,16 +408,12 @@ prompt_background_jobs() {
local n && n="${(fw)#$(jobs -rd)}" && ((n > 1)) || return
(( n /= 2 ))
- local cache_key="$0 $n"
- if ! _p9k_cache_get $cache_key; then
- if [[ "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE" == "true" &&
- ("$n" -gt 1 || "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS" == "true") ]]; then
- _p9k_cache_set $cache_key $n
- else
- _p9k_cache_set $cache_key ''
- fi
+ local prompt=''
+ if [[ "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE" == "true" &&
+ ("$n" -gt 1 || "$POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE_ALWAYS" == "true") ]]; then
+ prompt=$n
fi
- "$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "cyan" "$_P9K_RETVAL" 'BACKGROUND_JOBS_ICON'
+ "$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "cyan" "$prompt" 'BACKGROUND_JOBS_ICON'
}
################################################################