From: "Lawrence Velázquez" <larryv@zsh.org>
To: "Jan Breig" <subscriptions@pygos.space>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] Support more colors
Date: Fri, 13 May 2022 00:09:37 -0400 [thread overview]
Message-ID: <5fd58e66-626c-42ab-8463-00643d2d7171@www.fastmail.com> (raw)
In-Reply-To: <1c851030-c051-e5f7-8d82-a6a326eacff1@pygos.space>
On Thu, May 12, 2022, at 5:19 PM, Jan Breig wrote:
> +# Strong color codes
> + 90 strong-gray 100 bg-strong-gray
> + 91 strong-red 101 bg-strong-red
> + 92 strong-green 102 bg-strong-green
> + 93 strong-yellow 103 bg-strong-yellow
> + 94 strong-blue 104 bg-strong-blue
> + 95 strong-magenta 105 bg-strong-magenta
> + 96 strong-cyan 106 bg-strong-cyan
> + 97 strong-white 107 bg-strong-white
> )
What is the rationale for calling these "strong"? I don't think
I've ever seen them referred to as anything other than "bright".
See the xterm documentation, for example:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_
https://invisible-island.net/xterm/xterm.faq.html#bold_vs_16colors
I would prefer these be called "*bright-*" to avoid unnecessary
terminological discrepancy. If "strong" really is more common than
I think (entirely possible!), then the "*strong-*" names could be
included as additional reverse-mapped keys, but I would still
advocate for the numbered keys to have "*bright-*" values.
> for k in ${color[(I)3?]}; do color[fg-${color[$k]}]=$k; done
> +for k in ${color[(I)9?]}; do color[fg-${color[$k]}]=$k; done
I think these two lines could be expressed as
for k in ${color[(I)[39]?]}; do color[fg-${color[$k]}]=$k; done
...
Tangentially, as I understand it SGR 90-97 and 100-107 are not
standardized by ECMA-48 ("ANSI") but are an extension. This is not
really a problem, but the comments should be updated so they do not
imply that bright colors are ANSI.
--
vq
next prev parent reply other threads:[~2022-05-13 4:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 11:29 subscriptions
2022-05-10 11:56 ` Mikael Magnusson
2022-05-10 16:32 ` Bart Schaefer
2022-05-10 16:36 ` Bart Schaefer
2022-05-12 21:19 ` Jan Breig
2022-05-13 2:55 ` Bart Schaefer
2022-05-13 4:09 ` Lawrence Velázquez [this message]
2022-05-13 6:30 ` Jan Breig
2022-05-13 19:16 ` 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=5fd58e66-626c-42ab-8463-00643d2d7171@www.fastmail.com \
--to=larryv@zsh.org \
--cc=subscriptions@pygos.space \
--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).