zsh: cleanup color formatting

This might be problematic for older zsh version which do not support
%F{..} nor %f.
This commit is contained in:
Thomas Preisner 2017-05-03 19:21:50 +02:00
parent 65d6fbad18
commit e09da88655
2 changed files with 17 additions and 29 deletions

View file

@ -1,17 +1,5 @@
autoload colors; colors
# The variables are wrapped in \%\{\%\}. This should be the case for every
# variable that does not contain space.
for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do
eval PR_$COLOR='%{$fg_no_bold[${(L)COLOR}]%}'
eval PR_BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}'
done
eval RESET='$reset_color'
export PR_RED PR_GREEN PR_YELLOW PR_BLUE PR_WHITE PR_BLACK
export PR_BOLD_RED PR_BOLD_GREEN PR_BOLD_YELLOW PR_BOLD_BLUE
export PR_BOLD_WHITE PR_BOLD_BLACK
# Clear LSCOLORS
unset LSCOLORS