grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to grep/doc/grep.texi


From: Charles Levert
Subject: Changes to grep/doc/grep.texi
Date: Tue, 21 Jun 2005 10:58:52 -0400

Index: grep/doc/grep.texi
diff -u grep/doc/grep.texi:1.52 grep/doc/grep.texi:1.53
--- grep/doc/grep.texi:1.52     Mon May  2 09:47:48 2005
+++ grep/doc/grep.texi  Tue Jun 21 14:58:50 2005
@@ -262,13 +262,22 @@
 @cindex context
 Print @var{num} lines of output context.
 
address@hidden address@hidden
address@hidden address@hidden
address@hidden address@hidden
address@hidden address@hidden
address@hidden --color
 @opindex --colour
 @cindex highlight, color, colour
-Surround the matching strings with escape sequences to display them in color
-on the terminal.  The color is defined by the environment variable
address@hidden and defaults to `01;31' which means the text is red.
+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 @var{GREP_COLORS}
+and default to `mt=01;31:ml=:cx=:fn=35:ln=32:bn=32:se=36' for bold red
+matched text, magenta file names, green line numbers, green octet offsets,
+cyan separators, and default terminal colors otherwise.
+The deprecated environment variable @var{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.
 @var{WHEN} is `never', `always', or `auto'.
 
 @item address@hidden
@@ -576,8 +585,36 @@
 @item GREP_COLOR
 @vindex GREP_COLOR
 @cindex highlight markers
-This variable specifies the color used to highlight the matching text.
-The default is `01;31' which means red text on the default background.
+This variable is deprecated but still supported; its setting does not
+have priority over that of @code{GREP_COLORS}.
+It specifies the color used to highlight the matching text.
+The default is `01;31' which means bold red text on the default
+background.
+
address@hidden GREP_COLORS
address@hidden GREP_COLORS
address@hidden highlight markers
+This variable specifies the colors used to highlight
+the matching 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, 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.
address@hidden 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
address@hidden (@code{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).
 
 @item LC_ALL
 @itemx LC_COLLATE




reply via email to

[Prev in Thread] Current Thread [Next in Thread]