aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-06-29 11:58:38 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-06-29 11:58:38 +0300
commit613ffec4b61fc8c97427a99bcca72808a980645e (patch)
treec86c79c1a8a429352881ba4f78470878a329b9d8
parent2ecc0b14c882cebea204fa70cafad4dd008d2199 (diff)
make POWERLEVEL9K_VCS_${component}FORMAT_FOREGROUND overrides work on ZSH older than 5.2
-rwxr-xr-xinternal/p10k.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 30d4feb6..fd3f3778 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -1596,7 +1596,8 @@ powerlevel9k_vcs_init() {
local component state
for component in REMOTE_URL COMMIT BRANCH DIRTY TAG REMOTE_BRANCH STAGED UNSTAGED \
UNTRACKED OUTGOING_CHANGES INCOMING_CHANGES STASH ACTION; do
- local color=${(P)${:-POWERLEVEL9K_VCS_${component}FORMAT_FOREGROUND}}
+ local var=POWERLEVEL9K_VCS_${component}FORMAT_FOREGROUND
+ local color=${(P)var}
if [[ -n $color ]]; then
for state in "${(@k)vcs_states}"; do
local var=POWERLEVEL9K_VCS_${(U)state}_${component}FORMAT_FOREGROUND