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

PATCH: explicitly document need for # in colour hex triplets



Based on a user question on an external forum, we should explicitly
spell out the need for the # character when specifying colours as
hex triplets. It is already explicit a couple of paragraphs before
this but in the context of zle_highlight rather than prompts.

Note that it is necessary for us to require the # because 3 digit colour
numbers already refer to colours in the 256 colour palette. With 6
digits we might allow it to be omitted but I don't think it'd be a good
idea.

Oliver

diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index 0986e5390..c928b8ca2 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -2729,10 +2729,10 @@ limited to 256 (i.e. the range 0 to 255).
 
 Some modern terminal emulators have support for 24-bit true colour (16
 million colours). In this case, the hex triplet format can be used. This
-consists of either a three or six digit hexadecimal number describing
-the red, green and blue components of the colour. Hex triplets can also
-be used with 88 and 256 colour terminals via the tt(zsh/nearcolor)
-module (see ifzman(zmanref(zshmodules))\
+consists of a `tt(#)' followed by either a three or six digit hexadecimal
+number describing the red, green and blue components of the colour. Hex
+triplets can also be used with 88 and 256 colour terminals via the
+tt(zsh/nearcolor) module (see ifzman(zmanref(zshmodules))\
 ifnzman(noderef(The zsh/nearcolor Module))\
 ).
 



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