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