From cd5c2e7dcde9adbf70776eba06ea235195fe3cdb Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Thu, 3 Mar 2016 13:30:58 -0800 Subject: [PATCH 1/2] trying to debug color code that won't deref in `vcs_states` --- powerlevel9k.zsh-theme | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index d573f6f9..25ecd968 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -769,8 +769,9 @@ prompt_vcs() { typeset -AH vcs_states vcs_states=( 'clean' 'green' - 'modified' 'red' - 'untracked' 'yellow' + 'modified' 'yellow' + 'untracked' 'green' + 'actionformat' 'red' ) VCS_CHANGESET_PREFIX='' @@ -790,7 +791,8 @@ prompt_vcs() { VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%b%c%u%m" zstyle ':vcs_info:*' formats "$VCS_DEFAULT_FORMAT" - zstyle ':vcs_info:*' actionformats "%b %F{red}| %a%f" + zstyle ':vcs_info:*' actionformats "%b %F{${vcs_states['actionformat']}}| %a%f" + # zstyle ':vcs_info:*' actionformats "%b %F{red}| %a%f" zstyle ':vcs_info:*' stagedstr " $(print_icon 'VCS_STAGED_ICON')" zstyle ':vcs_info:*' unstagedstr " $(print_icon 'VCS_UNSTAGED_ICON')" From 9d8041fc7669fc539a4d7afecbe9d2d6024d30ba Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Thu, 3 Mar 2016 13:58:42 -0800 Subject: [PATCH 2/2] Fixed actionformat color coding --- powerlevel9k.zsh-theme | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 25ecd968..72d37318 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -791,8 +791,7 @@ prompt_vcs() { VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%b%c%u%m" zstyle ':vcs_info:*' formats "$VCS_DEFAULT_FORMAT" - zstyle ':vcs_info:*' actionformats "%b %F{${vcs_states['actionformat']}}| %a%f" - # zstyle ':vcs_info:*' actionformats "%b %F{red}| %a%f" + zstyle ':vcs_info:*' actionformats "%b %F{${vcs_states[actionformat]}}| %a%f" zstyle ':vcs_info:*' stagedstr " $(print_icon 'VCS_STAGED_ICON')" zstyle ':vcs_info:*' unstagedstr " $(print_icon 'VCS_UNSTAGED_ICON')"