1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-26 14:00:08 +00:00

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

This commit is contained in:
romkatv 2019-06-29 10:58:38 +02:00
parent 2ecc0b14c8
commit 613ffec4b6

View file

@ -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