##// END OF EJS Templates
color: point to the config help in global help topic...
Pierre-Yves David -
r32093:1e0f3723 stable
parent child Browse files
Show More
@@ -1,139 +1,141 b''
1 1 Mercurial colorizes output from several commands.
2 2
3 3 For example, the diff command shows additions in green and deletions
4 4 in red, while the status command shows modified files in magenta. Many
5 5 other commands have analogous colors. It is possible to customize
6 6 these colors.
7 7
8 8 To enable color (default) use::
9 9
10 10 [ui]
11 11 color = auto
12 12
13 13 To disable color use::
14 14
15 15 [ui]
16 16 color = never
17 17
18 See :hg:`help config.ui.color` for details.
19
18 20 Mode
19 21 ====
20 22
21 23 Mercurial can use various system to display color. The supported modes are
22 24 ``ansi``, ``win32``, and ``terminfo``. See :hg:`help config.color` for details
23 25 about how to control the mode
24 26
25 27 Effects
26 28 =======
27 29
28 30 Other effects in addition to color, like bold and underlined text, are
29 31 also available. By default, the terminfo database is used to find the
30 32 terminal codes used to change color and effect. If terminfo is not
31 33 available, then effects are rendered with the ECMA-48 SGR control
32 34 function (aka ANSI escape codes).
33 35
34 36 The available effects in terminfo mode are 'blink', 'bold', 'dim',
35 37 'inverse', 'invisible', 'italic', 'standout', and 'underline'; in
36 38 ECMA-48 mode, the options are 'bold', 'inverse', 'italic', and
37 39 'underline'. How each is rendered depends on the terminal emulator.
38 40 Some may not be available for a given terminal type, and will be
39 41 silently ignored.
40 42
41 43 If the terminfo entry for your terminal is missing codes for an effect
42 44 or has the wrong codes, you can add or override those codes in your
43 45 configuration::
44 46
45 47 [color]
46 48 terminfo.dim = \E[2m
47 49
48 50 where '\E' is substituted with an escape character.
49 51
50 52 Labels
51 53 ======
52 54
53 55 Text receives color effects depending on the labels that it has. Many
54 56 default Mercurial commands emit labelled text. You can also define
55 57 your own labels in templates using the label function, see :hg:`help
56 58 templates`. A single portion of text may have more than one label. In
57 59 that case, effects given to the last label will override any other
58 60 effects. This includes the special "none" effect, which nullifies
59 61 other effects.
60 62
61 63 Labels are normally invisible. In order to see these labels and their
62 64 position in the text, use the global --color=debug option. The same
63 65 anchor text may be associated to multiple labels, e.g.
64 66
65 67 [log.changeset changeset.secret|changeset: 22611:6f0a53c8f587]
66 68
67 69 The following are the default effects for some default labels. Default
68 70 effects may be overridden from your configuration file::
69 71
70 72 [color]
71 73 status.modified = blue bold underline red_background
72 74 status.added = green bold
73 75 status.removed = red bold blue_background
74 76 status.deleted = cyan bold underline
75 77 status.unknown = magenta bold underline
76 78 status.ignored = black bold
77 79
78 80 # 'none' turns off all effects
79 81 status.clean = none
80 82 status.copied = none
81 83
82 84 qseries.applied = blue bold underline
83 85 qseries.unapplied = black bold
84 86 qseries.missing = red bold
85 87
86 88 diff.diffline = bold
87 89 diff.extended = cyan bold
88 90 diff.file_a = red bold
89 91 diff.file_b = green bold
90 92 diff.hunk = magenta
91 93 diff.deleted = red
92 94 diff.inserted = green
93 95 diff.changed = white
94 96 diff.tab =
95 97 diff.trailingwhitespace = bold red_background
96 98
97 99 # Blank so it inherits the style of the surrounding label
98 100 changeset.public =
99 101 changeset.draft =
100 102 changeset.secret =
101 103
102 104 resolve.unresolved = red bold
103 105 resolve.resolved = green bold
104 106
105 107 bookmarks.active = green
106 108
107 109 branches.active = none
108 110 branches.closed = black bold
109 111 branches.current = green
110 112 branches.inactive = none
111 113
112 114 tags.normal = green
113 115 tags.local = black bold
114 116
115 117 rebase.rebased = blue
116 118 rebase.remaining = red bold
117 119
118 120 shelve.age = cyan
119 121 shelve.newest = green bold
120 122 shelve.name = blue bold
121 123
122 124 histedit.remaining = red bold
123 125
124 126 Custom colors
125 127 =============
126 128
127 129 Because there are only eight standard colors, Mercurial allows you
128 130 to define color names for other color slots which might be available
129 131 for your terminal type, assuming terminfo mode. For instance::
130 132
131 133 color.brightblue = 12
132 134 color.pink = 207
133 135 color.orange = 202
134 136
135 137 to set 'brightblue' to color slot 12 (useful for 16 color terminals
136 138 that have brighter colors defined in the upper eight) and, 'pink' and
137 139 'orange' to colors in 256-color xterm's default color cube. These
138 140 defined colors may then be used as any of the pre-defined eight,
139 141 including appending '_background' to set the background to that color.
General Comments 0
You need to be logged in to leave comments. Login now