Mercurial > hg-stable
changeset 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 | 864bc2f4279b |
children | 1c4ae0f6a30f |
files | hgext/color.py |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Wed Aug 27 16:39:44 2014 +0200 +++ b/hgext/color.py Sun Aug 24 17:35:36 2014 -0400 @@ -19,7 +19,16 @@ available, then effects are rendered with the ECMA-48 SGR control function (aka ANSI escape codes). -Default effects may be overridden from your configuration file:: +Text receives color effects depending on the labels that it has. Many +default Mercurial commands emit labelled text. You can also define +your own labels in templates using the label function, see :hg:`help +templates`. A single portion of text may have more than one label. In +that case, effects given to the last label will override any other +effects. This includes the special "none" effect, which nullifies +other effects. + +The following are the default effects for some default labels. Default +effects may be overridden from your configuration file:: [color] status.modified = blue bold underline red_background