aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-03-12 16:00:52 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-03-12 16:00:52 +0300
commitc9ee989e38c2b3ccdb60edbde7b42be23be0afb3 (patch)
tree42ce4cfe5f5976d9bce54bdd89e2fe1cd379f97e /powerlevel9k.zsh-theme
parenta0d2449c43500300243fd6007099637cdb246c45 (diff)
honor POWERLEVEL9K_MAX_CACHE_SIZE
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme1
1 files changed, 1 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index fd164702..c022984f 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -131,6 +131,7 @@ _p9k_cache_set() {
# echo "caching: ${(@0q)_P9K_CACHE_KEY} => (${(q)@})" >&2
_P9K_CACHE[$_P9K_CACHE_KEY]="${(pj:\0:)*}"
_P9K_CACHE_VAL=("$@")
+ (( #_P9K_CACHE < POWERLEVEL9K_MAX_CACHE_SIZE )) || typeset -gAH _P9K_CACHE=()
}
_p9k_cache_get() {