262 |
@cindex context |
@cindex context |
263 |
Print @var{num} lines of output context. |
Print @var{num} lines of output context. |
264 |
|
|
265 |
@item --colour[=@var{WHEN}] |
@item --color[=@var{WHEN}] |
266 |
@itemx --color[=@var{WHEN}] |
@itemx --colour[=@var{WHEN}] |
267 |
|
@opindex --color |
268 |
@opindex --colour |
@opindex --colour |
269 |
@cindex highlight, color, colour |
@cindex highlight, color, colour |
270 |
Surround the matching strings with escape sequences to display them in color |
Surround the matching strings, matching lines, context lines, file names, |
271 |
on the terminal. The color is defined by the environment variable |
line numbers, octet offsets, and separators (for fields and groups |
272 |
@var{GREP_COLOR} and defaults to `01;31' which means the text is red. |
of context lines) with escape sequences to display them in color on |
273 |
|
the terminal. |
274 |
|
The colors are defined by the environment variable @var{GREP_COLORS} |
275 |
|
and default to `mt=01;31:ml=:cx=:fn=35:ln=32:bn=32:se=36' for bold red |
276 |
|
matched text, magenta file names, green line numbers, green octet offsets, |
277 |
|
cyan separators, and default terminal colors otherwise. |
278 |
|
The deprecated environment variable @var{GREP_COLOR} is still supported, |
279 |
|
but its setting does not have priority; it defaults to `01;31' (bold red) |
280 |
|
which only covers the color for matched text. |
281 |
@var{WHEN} is `never', `always', or `auto'. |
@var{WHEN} is `never', `always', or `auto'. |
282 |
|
|
283 |
@item -@var{num} |
@item -@var{num} |
585 |
@item GREP_COLOR |
@item GREP_COLOR |
586 |
@vindex GREP_COLOR |
@vindex GREP_COLOR |
587 |
@cindex highlight markers |
@cindex highlight markers |
588 |
This variable specifies the color used to highlight the matching text. |
This variable is deprecated but still supported; its setting does not |
589 |
The default is `01;31' which means red text on the default background. |
have priority over that of @code{GREP_COLORS}. |
590 |
|
It specifies the color used to highlight the matching text. |
591 |
|
The default is `01;31' which means bold red text on the default |
592 |
|
background. |
593 |
|
|
594 |
|
@item GREP_COLORS |
595 |
|
@vindex GREP_COLORS |
596 |
|
@cindex highlight markers |
597 |
|
This variable specifies the colors used to highlight |
598 |
|
the matching text (mt), matching lines (ml), context lines (cx), |
599 |
|
file names (fn), line numbers (ln), octet offsets (bn), |
600 |
|
and separators (se, for fields and groups of context lines). |
601 |
|
It is a colon-separated list of color specification assignments. |
602 |
|
The default is `mt=01;31:ml=:cx=:fn=35:ln=32:bn=32:se=36' which means |
603 |
|
bold red, default, default, magenta, green, and cyan, all text foregrounds |
604 |
|
on the default background. |
605 |
|
Note that the `ml' setting, if any, remains in effect just before the |
606 |
|
`mt' setting kicks in. |
607 |
|
See the Select Graphic Rendition (SGR, for character attributes) |
608 |
|
section in the documentation of the text terminal that is used |
609 |
|
for permissible values (semicolon-separated lists of integers) |
610 |
|
and their meaning. |
611 |
|
@code{GREP_COLORS} also supports a boolean `ne' capability (with no |
612 |
|
`=...' part) to not clear to the end of line using Erase in Line (EL) |
613 |
|
to Right (`\33[K') each time a colorized item ends (needed on terminals |
614 |
|
on which EL is not supported; otherwise useful on terminals where the |
615 |
|
@code{back_color_erase} (@code{bce}) boolean terminfo capability is not |
616 |
|
specified, when the chosen highlight colors do not affect the background, |
617 |
|
or when EL is too slow to bother doing or causes too much flicker). |
618 |
|
|
619 |
@item LC_ALL |
@item LC_ALL |
620 |
@itemx LC_COLLATE |
@itemx LC_COLLATE |