Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: colour clarifications
- X-seq: zsh-workers 25052
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: colour clarifications
- Date: Fri, 16 May 2008 12:40:15 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Welcome to repetition city.
Index: Doc/Zsh/compctl.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compctl.yo,v
retrieving revision 1.8
diff -u -r1.8 compctl.yo
--- Doc/Zsh/compctl.yo 5 Jan 2007 20:55:03 -0000 1.8
+++ Doc/Zsh/compctl.yo 16 May 2008 11:38:19 -0000
@@ -469,7 +469,8 @@
string.
The sequences tt(%B), tt(%b), tt(%S), tt(%s), tt(%U), and tt(%u) specify
-output attributes (bold, standout, and underline) and tt(%{...%}) can
+output attributes (bold, standout, and underline), tt(%F), tt(%f), tt(%K),
+tt(%k) specify foreground and background colours, and tt(%{...%}) can
be used to include literal escape sequences as in prompts.
)
item(tt(-Y) var(explanation))(
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.208
diff -u -r1.208 compsys.yo
--- Doc/Zsh/compsys.yo 1 Apr 2008 09:22:30 -0000 1.208
+++ Doc/Zsh/compsys.yo 16 May 2008 11:38:25 -0000
@@ -1512,9 +1512,15 @@
If this is set for the tt(descriptions) tag, its value is used as a
string to display above matches in completion lists. The sequence
`tt(%d)' in this string will be replaced with a short description of
-what these matches are. This string may also contain the sequences to
-specify output attributes, such as `tt(%B)', `tt(%S)' and
-`tt(%{)...tt(%})'.
+what these matches are. This string may also contain the following
+sequences to specify output attributes,
+ifnzman(noderef(Prompt Expansion))\
+ifzman(as described in the section PROMPT EXPANSION in zmanref(zshmisc)):
+`tt(%B)', `tt(%S)', `tt(%U)', `tt(%F)', `tt(%K)' and their lower case
+counterparts, as well as `tt(%{)...tt(%})'. `tt(%F)', `tt(%K)' and
+`tt(%{)...tt(%})' take arguments in the same form as prompt
+expansion. Note that the tt(%G) sequence is not available; an argument
+to `tt(%{)' should be used instead.
The style is tested with each tag valid for the current completion
before it is tested for the tt(descriptions) tag. Hence different format
@@ -1870,9 +1876,10 @@
be replaced by a variable width string. As in other prompt strings, the
escape sequences `tt(%S)', `tt(%s)', `tt(%B)', `tt(%b)', `tt(%U)',
`tt(%u)' for entering and leaving the display modes
-standout, bold and underline are also available, as is the form
+standout, bold and underline, and `tt(%F)', `tt(%f)', `tt(%K)', `tt(%k)' for
+changing the foreground background colour, are also available, as is the form
`tt(%{)...tt(%})' for enclosing escape sequences which display with zero
-width.
+(or, with a numeric argument, some other) width.
After deleting this prompt the variable tt(LISTPROMPT) should be unset for
the the removal to take effect.
Index: Doc/Zsh/mod_complist.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_complist.yo,v
retrieving revision 1.22
diff -u -r1.22 mod_complist.yo
--- Doc/Zsh/mod_complist.yo 12 May 2008 17:04:01 -0000 1.22
+++ Doc/Zsh/mod_complist.yo 16 May 2008 11:38:25 -0000
@@ -160,7 +160,8 @@
parameter must be set. Its value will be used as the prompt; if it
is the empty string, a default prompt will be used. The value may
contain escapes of the form `tt(%x)'. It supports the escapes
-`tt(%B)', `tt(%b)', `tt(%S)', `tt(%s)', `tt(%U)', `tt(%u)' and
+`tt(%B)', `tt(%b)', `tt(%S)', `tt(%s)', `tt(%U)', `tt(%u)', `tt(%F)',
+`tt(%f)', `tt(%K)', `tt(%k)' and
`tt(%{...%})' used also in shell prompts as well as three pairs of
additional sequences: a `tt(%l)' or `tt(%L)' is replaced by the number
of the last line shown and the total number of lines in the form
Index: Doc/Zsh/prompt.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/prompt.yo,v
retrieving revision 1.12
diff -u -r1.12 prompt.yo
--- Doc/Zsh/prompt.yo 9 May 2008 17:33:50 -0000 1.12
+++ Doc/Zsh/prompt.yo 16 May 2008 11:38:26 -0000
@@ -191,7 +191,8 @@
the values allowed are as described for the tt(fg) tt(zle_highlight)
attribute;
ifzman(see em(Character Highlighting) in zmanref(zshzle))\
-ifnzman(noderef(Character Highlighting)).
+ifnzman(noderef(Character Highlighting)). This means that numeric
+colours are allowed in the second format also.
)
item(tt(%K) LPAR()tt(%k)RPAR())(
Start (stop) using a different bacKground colour. The syntax is
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author