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:
parent
2ecc0b14c8
commit
613ffec4b6
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue