trying to debug color code that won't deref in vcs_states

This commit is contained in:
Ben Hilburn 2016-03-03 13:30:58 -08:00
parent d6902db6ef
commit cd5c2e7dcd

View file

@ -769,8 +769,9 @@ prompt_vcs() {
typeset -AH vcs_states typeset -AH vcs_states
vcs_states=( vcs_states=(
'clean' 'green' 'clean' 'green'
'modified' 'red' 'modified' 'yellow'
'untracked' 'yellow' 'untracked' 'green'
'actionformat' 'red'
) )
VCS_CHANGESET_PREFIX='' VCS_CHANGESET_PREFIX=''
@ -790,7 +791,8 @@ prompt_vcs() {
VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%b%c%u%m" VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%b%c%u%m"
zstyle ':vcs_info:*' formats "$VCS_DEFAULT_FORMAT" 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:*' stagedstr " $(print_icon 'VCS_STAGED_ICON')"
zstyle ':vcs_info:*' unstagedstr " $(print_icon 'VCS_UNSTAGED_ICON')" zstyle ':vcs_info:*' unstagedstr " $(print_icon 'VCS_UNSTAGED_ICON')"