summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCharles Levert <charles_levert@gna.org>2005-07-05 01:03:31 +0000
committerCharles Levert <charles_levert@gna.org>2005-07-05 01:03:31 +0000
commit14b00d96eb34379bfd26a2893cef7f2e5c6b6406 (patch)
treeaadf6785d44a71108f54f4d66742399f728780de /doc
parenta8f20cf824680b876e45b3a1484b906d277839c6 (diff)
downloadgrep-14b00d96eb34379bfd26a2893cef7f2e5c6b6406.tar.gz
* doc/grep.texi: Add missing green color in GREP_COLORS description.
* doc/grep.1: Fix typo and reorganize GREP_COLORS documentation.
Diffstat (limited to 'doc')
-rw-r--r--doc/grep.153
-rw-r--r--doc/grep.texi4
2 files changed, 29 insertions, 28 deletions
diff --git a/doc/grep.1 b/doc/grep.1
index 5e44e3b9..687c5853 100644
--- a/doc/grep.1
+++ b/doc/grep.1
@@ -12,7 +12,7 @@
.de Id
.ds Dt \\$4
..
-.Id $Id: grep.1,v 1.31 2005/06/21 15:22:58 charles_levert Exp $
+.Id $Id: grep.1,v 1.32 2005/07/05 01:03:33 charles_levert Exp $
.TH GREP 1 \*(Dt "GNU Project"
.SH NAME
grep, egrep, fgrep \- print lines matching a pattern
@@ -127,34 +127,15 @@ which can have nasty side effects if the output is a terminal and if the
terminal driver interprets some of it as commands.
.TP
.BI \-\^\-color[=\fIWHEN\fR] ", " \-\^\-colour[=\fIWHEN\fR]
-Surround the matching strings, matchings lines, context lines, file
+Surround the matching strings, matching lines, context lines, file
names, line numbers, octet offsets, and separators (for fields and
groups of context lines) with escape sequences to display them in color
on the terminal.
The colors are defined by the environment variable
-.B GREP_COLORS
-and default to `mt=01;31:ml=:cx=:fn=35:ln=32:bn=32:se=36' for bold red
-matched text, default matching lines, default context lines,
-magenta file names, green line numbers, green octet offsets,
-and cyan separators.
-Note that the `ml' setting, if any, remains in effect just before the
-`mt' setting kicks in.
-See the Select Graphic Rendition (SGR, for character attributes)
-section in the documentation of the text terminal that is used
-for permissible values (semicolon-separated lists of integers)
-and their meaning.
-.B GREP_COLORS
-also supports a boolean `ne' capability (with no `=...' part) to not
-clear to the end of line using Erase in Line (EL) to Right (`\\33[K')
-each time a colorized item ends (needed on terminals on which EL is not
-supported; otherwise useful on terminals where the `back_color_erase'
-(`bce') boolean terminfo capability is not specified, when the chosen
-highlight colors do not affect the background, or when EL is too slow
-to bother doing or causes too much flicker).
+.BR GREP_COLORS .
The deprecated environment variable
.B GREP_COLOR
-is still supported, but its setting does not have priority; it defaults to
-`01;31' (bold red) which only covers the color for matched text.
+is still supported, but its setting does not have priority.
.I WHEN
is `never', `always', or `auto'.
.TP
@@ -743,11 +724,31 @@ so it can be used to specify an option containing whitespace or a backslash.
Deprecated in favor of
.BR GREP_COLORS ,
which has priority.
-Specifies the marker for highlighting.
+It can only specify the marker for highlighting matched text and
+defaults to `01;31' (bold red).
.TP
.B GREP_COLORS
-Specifies the markers for highlighting matched text, file names,
-line numbers, octet offsets, and separators.
+Specifies the markers for highlighting matched text (mt), matching lines
+(ml), context lines (cx), file names (fn), line numbers (ln), octet
+offsets (bn), and separators (se, for fields and groups of context lines).
+It is a colon-separated list of color specification assignments.
+The default is `mt=01;31:ml=:cx=:fn=35:ln=32:bn=32:se=36' which means
+bold red, default, default, magenta, green, green, and cyan, all text
+foregrounds on the default background.
+Note that the `ml' setting, if any, remains in effect just before the
+`mt' setting kicks in.
+See the Select Graphic Rendition (SGR, for character attributes)
+section in the documentation of the text terminal that is used
+for permissible values (semicolon-separated lists of integers)
+and their meaning.
+.B GREP_COLORS
+also supports a boolean `ne' capability (with no `=...' part) to not
+clear to the end of line using Erase in Line (EL) to Right (`\\33[K')
+each time a colorized item ends (needed on terminals on which EL is not
+supported; otherwise useful on terminals where the `back_color_erase'
+(`bce') boolean terminfo capability is not specified, when the chosen
+highlight colors do not affect the background, or when EL is too slow
+to bother doing or causes too much flicker).
.TP
\fBLC_ALL\fP, \fBLC_COLLATE\fP, \fBLANG\fP
These variables specify the
diff --git a/doc/grep.texi b/doc/grep.texi
index e42324fa..3d805614 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -616,8 +616,8 @@ file names (fn), line numbers (ln), octet offsets (bn),
and separators (se, for fields and groups of context lines).
It is a colon-separated list of color specification assignments.
The default is `mt=01;31:ml=:cx=:fn=35:ln=32:bn=32:se=36' which means
-bold red, default, default, magenta, green, and cyan, all text foregrounds
-on the default background.
+bold red, default, default, magenta, green, green, and cyan, all text
+foregrounds on the default background.
Note that the `ml' setting, if any, remains in effect just before the
`mt' setting kicks in.
See the Select Graphic Rendition (SGR, for character attributes)