Show More
@@ -13,12 +13,25 b' in red, while the status command shows m' | |||
|
13 | 13 | other commands have analogous colors. It is possible to customize |
|
14 | 14 | these colors. |
|
15 | 15 | |
|
16 | Effects | |
|
17 | ------- | |
|
18 | ||
|
16 | 19 | Other effects in addition to color, like bold and underlined text, are |
|
17 | 20 | also available. By default, the terminfo database is used to find the |
|
18 | 21 | terminal codes used to change color and effect. If terminfo is not |
|
19 | 22 | available, then effects are rendered with the ECMA-48 SGR control |
|
20 | 23 | function (aka ANSI escape codes). |
|
21 | 24 | |
|
25 | The available effects in terminfo mode are 'blink', 'bold', 'dim', | |
|
26 | 'inverse', 'invisible', 'italic', 'standout', and 'underline'; in | |
|
27 | ECMA-48 mode, the options are 'bold', 'inverse', 'italic', and | |
|
28 | 'underline'. How each is rendered depends on the terminal emulator. | |
|
29 | Some may not be available for a given terminal type, and will be | |
|
30 | silently ignored. | |
|
31 | ||
|
32 | Labels | |
|
33 | ------ | |
|
34 | ||
|
22 | 35 | Text receives color effects depending on the labels that it has. Many |
|
23 | 36 | default Mercurial commands emit labelled text. You can also define |
|
24 | 37 | your own labels in templates using the label function, see :hg:`help |
@@ -90,20 +103,8 b' effects may be overridden from your conf' | |||
|
90 | 103 | |
|
91 | 104 | histedit.remaining = red bold |
|
92 | 105 | |
|
93 | The available effects in terminfo mode are 'blink', 'bold', 'dim', | |
|
94 | 'inverse', 'invisible', 'italic', 'standout', and 'underline'; in | |
|
95 | ECMA-48 mode, the options are 'bold', 'inverse', 'italic', and | |
|
96 | 'underline'. How each is rendered depends on the terminal emulator. | |
|
97 | Some may not be available for a given terminal type, and will be | |
|
98 | silently ignored. | |
|
99 | ||
|
100 | Note that on some systems, terminfo mode may cause problems when using | |
|
101 | color with the pager extension and less -R. less with the -R option | |
|
102 | will only display ECMA-48 color codes, and terminfo mode may sometimes | |
|
103 | emit codes that less doesn't understand. You can work around this by | |
|
104 | either using ansi mode (or auto mode), or by using less -r (which will | |
|
105 | pass through all terminal control codes, not just color control | |
|
106 | codes). | |
|
106 | Custom colors | |
|
107 | ------------- | |
|
107 | 108 | |
|
108 | 109 | Because there are only eight standard colors, this module allows you |
|
109 | 110 | to define color names for other color slots which might be available |
@@ -119,6 +120,9 b' that have brighter colors defined in the' | |||
|
119 | 120 | defined colors may then be used as any of the pre-defined eight, |
|
120 | 121 | including appending '_background' to set the background to that color. |
|
121 | 122 | |
|
123 | Modes | |
|
124 | ----- | |
|
125 | ||
|
122 | 126 | By default, the color extension will use ANSI mode (or win32 mode on |
|
123 | 127 | Windows) if it detects a terminal. To override auto mode (to enable |
|
124 | 128 | terminfo mode, for example), set the following configuration option:: |
@@ -128,6 +132,14 b' terminfo mode, for example), set the fol' | |||
|
128 | 132 | |
|
129 | 133 | Any value other than 'ansi', 'win32', 'terminfo', or 'auto' will |
|
130 | 134 | disable color. |
|
135 | ||
|
136 | Note that on some systems, terminfo mode may cause problems when using | |
|
137 | color with the pager extension and less -R. less with the -R option | |
|
138 | will only display ECMA-48 color codes, and terminfo mode may sometimes | |
|
139 | emit codes that less doesn't understand. You can work around this by | |
|
140 | either using ansi mode (or auto mode), or by using less -r (which will | |
|
141 | pass through all terminal control codes, not just color control | |
|
142 | codes). | |
|
131 | 143 | ''' |
|
132 | 144 | |
|
133 | 145 | import os |
General Comments 0
You need to be logged in to leave comments.
Login now