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

Functions/Misc/colors vs. region_highlight



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




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