zsh-workers
 help / color / mirror / code / Atom feed
* prompt colors bug? also possible feature add
@ 2023-08-17 22:18 Jim
  2023-08-17 23:23 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Jim @ 2023-08-17 22:18 UTC (permalink / raw)
  To: devs


[-- Attachment #1.1: Type: text/plain, Size: 911 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1262 bytes --]

[-- Attachment #2: test_prompt_colors.txt --]
[-- Type: text/plain, Size: 502 bytes --]

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 #3: prompt_test_on_white_bg.png --]
[-- Type: image/png, Size: 17591 bytes --]

[-- Attachment #4: prompt_test_on_black_bg.png --]
[-- Type: image/png, Size: 73991 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-20  1:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17 22:18 prompt colors bug? also possible feature add Jim
2023-08-17 23:23 ` Bart Schaefer
2023-08-23  0:37   ` Jim
2023-08-23  4:20     ` Bart Schaefer
2023-08-23 12:42       ` Jim
2023-08-24  3:45         ` Bart Schaefer
2023-09-20  1:15           ` Jim
2023-09-20  1:56             ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).