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