zsh-workers
 help / color / mirror / code / Atom feed
From: Jim <linux.tech.guy@gmail.com>
To: devs <zsh-workers@zsh.org>
Subject: prompt colors bug? also possible feature add
Date: Thu, 17 Aug 2023 17:18:42 -0500	[thread overview]
Message-ID: <CA+rB6GK+yHJE_rs4jN2HR_KN8Oj2u1mwFqFV_VwzZmpyZ5EinQ@mail.gmail.com> (raw)


[-- 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 --]

             reply	other threads:[~2023-08-17 22:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 22:18 Jim [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+rB6GK+yHJE_rs4jN2HR_KN8Oj2u1mwFqFV_VwzZmpyZ5EinQ@mail.gmail.com \
    --to=linux.tech.guy@gmail.com \
    --cc=linuxtechguy@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).