Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Functions/Misc/colors vs. region_highlight
- X-seq: zsh-workers 47489
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Functions/Misc/colors vs. region_highlight
- Date: Fri, 23 Oct 2020 17:50:08 -0700
- Archived-at: <https://zsh.org/workers/47489>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-10/CAH%2Bw%3D7YDH-WPzaPJ%3DTfyN_mAmaA%2BjHthdhZOrP-rnQL2XzsLLA%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-ot1-f49.google.com) smtp.remote-ip=209.85.210.49; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none
- Cc: Marlon Richert <marlon.richert@xxxxxxxxx>, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FtEGHaJ2ufDehEDtvx9m2+rF4dO6AaazZVxBRcJucxU=; b=MHmQf75NNo01VNAB6NTlZYEw25Umk8o32mNPnBMTjKs+hxkVFp/2Ovy6tdEZ1LHzIh I8UsqUBHf1xlubq9K9OfZ2ywJeFYQR1DuGWF+vuPiQfMbhA6SpMc+lM5thO3aj7Iqa+0 2uM4zqYjwFbliP67L+9z7tmQFqi6wgsJd2aAyD15xeaHKEG0R4u6rW/+f29D8h15f/zl +qFjtSFXTTMvvYR4RcwWmvXkX1W0oj+xkuu2aspVBvy6qdk4B0kOes0vmyMbpTKchjtC WallMWvdBtRFzbopoxZBMHYD4YWLwPczwb4F1UI3xdyXTtlns2qZn6iT0DeF7ho1WOpo qGWA==
- In-reply-to: <CAN=4vMoUZExCRW4u=+D_LPgQBf4HoLFmDiwTaUepbHdJN3qQKw@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <CAHLkEDv9ch+nhtpYF3So+029J6GMv5iU-8=RzHRHLa7OYzc3kg@mail.gmail.com> <CAN=4vMq1CjLKiwM0_HWfQf5=xLTGQ7z9mVs=QEsCp05suLK-fA@mail.gmail.com> <20201014204621.4cf5b2b0@tarpaulin.shahaf.local2> <CAN=4vMqencidrpknTheyjAYQRT9BHN8ZLXRFk2Z38Gfwx9mxyQ@mail.gmail.com> <cd3c7101-2735-4e4e-a40f-76d0850f471d@www.fastmail.com> <CAH+w=7aHWUQSFCJ3NQDVDBg=X8J1WD+YbNMQ21=c4xXs=LPBqg@mail.gmail.com> <CAHLkEDvThAYDbqvVt9u8tRDxSnXjXo=hCierGQODA4KZPcQzxw@mail.gmail.com> <CAN=4vMr+dXkY3LsfRoJO06dHV=Y8MB3S1RFwqZ1m6YGJhLK3dQ@mail.gmail.com> <CAHLkEDuhnFzF5Xad7t66DGrwY=Ri9-7VN_P-yOUr03GGTUiKSA@mail.gmail.com> <CAN=4vMrJ4_kLMmLdJn7VtTNu7g-=uj-wdZJeq9w36Nq5_p0UyQ@mail.gmail.com> <CAHLkEDs_jT3A8833MkO6r6rOB=3Rshi-hqDcshXSY8EBs6sy-Q@mail.gmail.com> <CAN=4vMoUZExCRW4u=+D_LPgQBf4HoLFmDiwTaUepbHdJN3qQKw@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
On Fri, Oct 23, 2020 at 4:38 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> The fact that region_highlight and zle_highlight support "standout" is
> not a problem but a feature. Standout is a part of the curses standard
> and zsh interprets it within region_highlight and zle_highlight in a
> manner consistent with the standard. ("standout" within "colors" is a
> different matter. That one is incorrect in my opinion.)
You're correct that "standout" doesn't match the terminology in
ECMA-48. The use of "standout" was chosen to follow the terminology
in prompt strings, I believe.
This matched the behavior of most terminals at the time (notice
${(k)color[(r)standout]} is actually from Sven all the way back in
2001). Also, there's no way to directly reference an escape sequence
for any of the "Attribute Codes" (they aren't in the $fg / $bg
hashes), so those values are mostly there for commentary value.
I would have no objection to adding "italic"/"no-italic" to the color
hash. It also appears standout would more accurately be tied to
reverse-video now, but because the keys of the hash are the numeric
codes we can only have one or the other.
diff --git a/Functions/Misc/colors b/Functions/Misc/colors
index 027ca9a14..b221e6688 100644
--- a/Functions/Misc/colors
+++ b/Functions/Misc/colors
@@ -14,11 +14,12 @@ color=(
00 none # 20 gothic
01 bold # 21 double-underline
02 faint 22 normal
- 03 standout 23 no-standout
+ 03 italic 23 no-italic # no-gothic
04 underline 24 no-underline
05 blink 25 no-blink
# 06 fast-blink # 26 proportional
07 reverse 27 no-reverse
+# 07 standout 27 no-standout
08 conceal 28 no-conceal
# 09 strikethrough # 29 no-strikethrough
- References:
- region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
- Re: region_highlight converts `fg=default` to `none`, which is not the same
Messages sorted by:
Reverse Date,
Date,
Thread,
Author