make POWERLEVEL9K_VCS_${component}FORMAT_FOREGROUND overrides work on ZSH older than 5.2

pull/98/head^2
romkatv 6 years ago
parent 2ecc0b14c8
commit 613ffec4b6

@ -1596,7 +1596,8 @@ powerlevel9k_vcs_init() {
local component state local component state
for component in REMOTE_URL COMMIT BRANCH DIRTY TAG REMOTE_BRANCH STAGED UNSTAGED \ for component in REMOTE_URL COMMIT BRANCH DIRTY TAG REMOTE_BRANCH STAGED UNSTAGED \
UNTRACKED OUTGOING_CHANGES INCOMING_CHANGES STASH ACTION; do 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 if [[ -n $color ]]; then
for state in "${(@k)vcs_states}"; do for state in "${(@k)vcs_states}"; do
local var=POWERLEVEL9K_VCS_${(U)state}_${component}FORMAT_FOREGROUND local var=POWERLEVEL9K_VCS_${(U)state}_${component}FORMAT_FOREGROUND

Loading…
Cancel
Save