Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

prompt colors bug? also possible feature add



Hi all,

While working on colors and prompts I noticed that gray and grey
do not work in a prompt. But in the colors function it states:

# This is inaccurate, but the prompt theme system needs it.

for k in grey gray; do
  color[$k]=${color[black]}
  color[fg-$k]=${color[$k]}
  color[bg-$k]=${color[bg-black]}
done

Also wondering, since bright colors were added to colors, were they also
going to be included in prompts? That said, my $0.02 - I'm happy that all
16 colors are there in numbers 0 thru 15 and works as expected.

Is there any reason gray and grey couldn't be set correctly by using \e[38;5;8m
and \e[48;5;8m?  Just a thought. Even the linux console supports all 16 colors.
it just doesn't support bold.

ZSH_PATCHLEVEL zsh-5.9-208-gf80ad32

Attached is a function I wrote "test_prompt_output.txt", and two png files
prompt_test_on_black_bg.png
prompt_test_on_white_bg.png

Regards,

Jim Murphy
emulate -L zsh -o extendedglob
local     E N
local     CNs
CNs=(black red green yellow blue magenta cyan white grey gray
    bright-gray bright-red bright-green bright-yellow bright-blue
    bright-magenta bright-cyan bright-white)
for N ({0..15}) {
  TP="%K{$N}%n@%m%k %B%F{1}%(4~|...|)%1~%F{15} %# %b%f%k"
  print -- "${(l.2.. .)N}  ${(%)TP}"
}
for E ($CNs) {
  TP="%K{$E}%n@%m%k %B%F{1}%(4~|...|)%1~%F{15} %# %b%f%k"
  print -- "${(l.14.. .)E}  ${(%)TP}"
}
# vim: ts=2 sw=2 sts=2 sta ai et ft=zsh :

Attachment: prompt_test_on_white_bg.png
Description: PNG image

Attachment: prompt_test_on_black_bg.png
Description: PNG image



Messages sorted by: Reverse Date, Date, Thread, Author