comparison hgext/color.py @ 22462:fbd67cf34799

color: document that labels are used for colorizing text It is a deeply hidden secret that it's possible to colorise so many things with so many different labels. This is an attempt to document this. The text is a bit long, but it seems as short as can be while documenting everything. Perhaps it should be hidden under a --verbose option.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Sun, 24 Aug 2014 17:35:36 -0400
parents aca137619a45
children 1c4ae0f6a30f
comparison
equal deleted inserted replaced
22461:864bc2f4279b 22462:fbd67cf34799
17 also available. By default, the terminfo database is used to find the 17 also available. By default, the terminfo database is used to find the
18 terminal codes used to change color and effect. If terminfo is not 18 terminal codes used to change color and effect. If terminfo is not
19 available, then effects are rendered with the ECMA-48 SGR control 19 available, then effects are rendered with the ECMA-48 SGR control
20 function (aka ANSI escape codes). 20 function (aka ANSI escape codes).
21 21
22 Default effects may be overridden from your configuration file:: 22 Text receives color effects depending on the labels that it has. Many
23 default Mercurial commands emit labelled text. You can also define
24 your own labels in templates using the label function, see :hg:`help
25 templates`. A single portion of text may have more than one label. In
26 that case, effects given to the last label will override any other
27 effects. This includes the special "none" effect, which nullifies
28 other effects.
29
30 The following are the default effects for some default labels. Default
31 effects may be overridden from your configuration file::
23 32
24 [color] 33 [color]
25 status.modified = blue bold underline red_background 34 status.modified = blue bold underline red_background
26 status.added = green bold 35 status.added = green bold
27 status.removed = red bold blue_background 36 status.removed = red bold blue_background