And use it in 50_prompt which leads to better handling of foreground
and background colors modified for the prompt in a theme.
autoload -Uz colors
colors
autoload -Uz colors
colors
+fg[default]="\e[39m"
+bg[default]="\e[49m"
+
# Foreground (FG) and background (BG) colors.
typeset -Ag FG BG
for color in {000..255}; do
# Foreground (FG) and background (BG) colors.
typeset -Ag FG BG
for color in {000..255}; do
ZSH_THEME_VCS_PROMPT_PREFIX_SPACING="("
ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}"
ZSH_THEME_VCS_PROMPT_PREFIX_SPACING="("
ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}"
-ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}"
+ZSH_THEME_VCS_PROMPT_SUFFIX="%{$fg[default]%}"
ZSH_THEME_VCS_PROMPT_SUFFIX_SPACING=")"
ZSH_THEME_VCS_PROMPT_SUFFIX_SPACING=")"
-ZSH_THEME_VCS_PROMPT_CLEAN=" %{$fg_no_bold[green]%}$clean"
-ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg_no_bold[red]%}$dirty"
-ZSH_THEME_VCS_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}$ahead"
-ZSH_THEME_VCS_PROMPT_BEHIND="%{$fg_no_bold[blue]%}$behind"
+ZSH_THEME_VCS_PROMPT_CLEAN=" %{$fg_no_bold[green]%}$clean%{$fg[default]%}"
+ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg_no_bold[red]%}$dirty%{$fg[default]%}"
+ZSH_THEME_VCS_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}$ahead%{$fg[default]%}"
+ZSH_THEME_VCS_PROMPT_BEHIND="%{$fg_no_bold[blue]%}$behind%{$fg[default]%}"
unset clean dirty ahead behind
unset clean dirty ahead behind