grep-commit
[Top][All Lists]
Advanced

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

Changes to grep/manual/html_node/Environment-Variables.html,v


From: Jim Meyering
Subject: Changes to grep/manual/html_node/Environment-Variables.html,v
Date: Sat, 3 Sep 2022 15:33:16 -0400 (EDT)

CVSROOT:        /webcvs/grep
Module name:    grep
Changes by:     Jim Meyering <meyering> 22/09/03 15:33:15

Index: html_node/Environment-Variables.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/Environment-Variables.html,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- html_node/Environment-Variables.html        14 Aug 2021 20:46:40 -0000      
1.32
+++ html_node/Environment-Variables.html        3 Sep 2022 19:33:14 -0000       
1.33
@@ -5,7 +5,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <!-- This manual is for grep, a pattern matching engine.
 
-Copyright (C) 1999-2002, 2005, 2008-2021 Free Software Foundation,
+Copyright (C) 1999-2002, 2005, 2008-2022 Free Software Foundation,
 Inc.
 
 Permission is granted to copy, distribute and/or modify this document
@@ -14,10 +14,10 @@
 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
 Texts.  A copy of the license is included in the section entitled
 "GNU Free Documentation License". -->
-<title>Environment Variables (GNU Grep 3.7)</title>
+<title>Environment Variables (GNU Grep 3.8)</title>
 
-<meta name="description" content="Environment Variables (GNU Grep 3.7)">
-<meta name="keywords" content="Environment Variables (GNU Grep 3.7)">
+<meta name="description" content="Environment Variables (GNU Grep 3.8)">
+<meta name="keywords" content="Environment Variables (GNU Grep 3.8)">
 <meta name="resource-type" content="document">
 <meta name="distribution" content="global">
 <meta name="Generator" content="makeinfo">
@@ -62,8 +62,10 @@
 <hr>
 <span id="Environment-Variables-1"></span><h3 class="section">2.2 Environment 
Variables</h3>
 
-<p>The behavior of <code>grep</code> is affected
-by the following environment variables.
+<p>The behavior of <code>grep</code> is affected by several environment
+variables, the most important of which control the locale, which
+specifies how <code>grep</code> interprets characters in its patterns and
+data.
 </p>
 <span id="index-LANGUAGE-environment-variable"></span>
 <span id="index-LC_005fALL-environment-variable"></span>
@@ -75,8 +77,8 @@
 in that order.
 The first of these variables that is set specifies the locale.
 For example, if <code>LC_ALL</code> is not set,
-but <code>LC_COLLATE</code> is set to &lsquo;<samp>pt_BR</samp>&rsquo;,
-then the Brazilian Portuguese locale is used
+but <code>LC_COLLATE</code> is set to &lsquo;<samp>pt_BR.UTF-8</samp>&rsquo;,
+then a Brazilian Portuguese locale is used
 for the <code>LC_COLLATE</code> category.
 As a special case for <code>LC_MESSAGES</code> only, the environment variable
 <code>LANGUAGE</code> can contain a colon-separated list of languages that
@@ -88,7 +90,32 @@
 with national language support (NLS).
 The shell command <code>locale -a</code> lists locales that are currently 
available.
 </p>
-<p>Many of the environment variables in the following list let you
+<span id="index-environment-variables"></span>
+<p>The following environment variables affect the behavior of 
<code>grep</code>.
+</p>
+<dl compact="compact">
+<dt 
id='index-GREP_005fCOLOR-environment-variable'><span><code>GREP_COLOR</code><a 
href='#index-GREP_005fCOLOR-environment-variable' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-highlight-markers"></span>
+<p>This obsolescent variable interacts with <code>GREP_COLORS</code>
+confusingly, and <code>grep</code> warns if it is set and is not
+overridden by <code>GREP_COLORS</code>.  Instead of
+&lsquo;<samp>GREP_COLOR='<var>color</var>'</samp>&rsquo;, you can use
+&lsquo;<samp>GREP_COLORS='mt=<var>color</var>'</samp>&rsquo;.
+</p>
+</dd>
+<dt 
id='index-GREP_005fCOLORS-environment-variable'><span><code>GREP_COLORS</code><a
 href='#index-GREP_005fCOLORS-environment-variable' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><span id="index-highlight-markers-1"></span>
+<p>This variable specifies the colors and other attributes
+used to highlight various parts of the output.
+Its value is a colon-separated list of <code>terminfo</code> capabilities
+that defaults to 
&lsquo;<samp>ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36</samp>&rsquo;
+with the &lsquo;<samp>rv</samp>&rsquo; and &lsquo;<samp>ne</samp>&rsquo; 
boolean capabilities omitted (i.e., false).
+The two-letter capability names
+refer to terminal &ldquo;capabilities,&rdquo; the ability
+of a terminal to highlight text, or change its color, and so on.
+These capabilities are stored in an online database and accessed by
+the <code>terminfo</code> library.
+Non-empty capability values
 control highlighting using
 Select Graphic Rendition (SGR)
 commands interpreted by the terminal or terminal emulator.
@@ -116,37 +143,7 @@
 and &lsquo;<samp>48;5;0</samp>&rsquo; to &lsquo;<samp>48;5;255</samp>&rsquo;
 for 88-color and 256-color modes background colors.
 </p>
-<p>The two-letter names used in the <code>GREP_COLORS</code> environment 
variable
-(and some of the others) refer to terminal &ldquo;capabilities,&rdquo; the 
ability
-of a terminal to highlight text, or change its color, and so on.
-These capabilities are stored in an online database and accessed by
-the <code>terminfo</code> library.
-</p>
-<span id="index-environment-variables"></span>
-
-<dl compact="compact">
-<dt 
id='index-GREP_005fCOLOR-environment-variable'><span><code>GREP_COLOR</code><a 
href='#index-GREP_005fCOLOR-environment-variable' class='copiable-anchor'> 
&para;</a></span></dt>
-<dd><span id="index-highlight-markers"></span>
-<p>This variable specifies the color used to highlight matched (non-empty) 
text.
-It is deprecated in favor of <code>GREP_COLORS</code>, but still supported.
-The &lsquo;<samp>mt</samp>&rsquo;, &lsquo;<samp>ms</samp>&rsquo;, and 
&lsquo;<samp>mc</samp>&rsquo; capabilities of <code>GREP_COLORS</code>
-have priority over it.
-It can only specify the color used to highlight
-the matching non-empty text in any matching line
-(a selected line when the <samp>-v</samp> command-line option is omitted,
-or a context line when <samp>-v</samp> is specified).
-The default is &lsquo;<samp>01;31</samp>&rsquo;,
-which means a bold red foreground text on the terminal&rsquo;s default 
background.
-</p>
-</dd>
-<dt 
id='index-GREP_005fCOLORS-environment-variable'><span><code>GREP_COLORS</code><a
 href='#index-GREP_005fCOLORS-environment-variable' class='copiable-anchor'> 
&para;</a></span></dt>
-<dd><span id="index-highlight-markers-1"></span>
-<p>This variable specifies the colors and other attributes
-used to highlight various parts of the output.
-Its value is a colon-separated list of <code>terminfo</code> capabilities
-that defaults to 
&lsquo;<samp>ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36</samp>&rsquo;
-with the &lsquo;<samp>rv</samp>&rsquo; and &lsquo;<samp>ne</samp>&rsquo; 
boolean capabilities omitted (i.e., false).
-Supported capabilities are as follows.
+<p>Supported capabilities are as follows.
 </p>
 <dl compact="compact">
 <dt id='index-sl-GREP_005fCOLORS-capability'><span><code>sl=</code><a 
href='#index-sl-GREP_005fCOLORS-capability' class='copiable-anchor'> 
&para;</a></span></dt>
@@ -256,7 +253,7 @@
 <span id="index-national-language-support"></span>
 <span id="index-NLS"></span>
 <p>These variables specify the locale for the <code>LC_COLLATE</code> category,
-which might affect how range expressions like &lsquo;<samp>[a-z]</samp>&rsquo; 
are
+which might affect how range expressions like &lsquo;<samp>a-z</samp>&rsquo; 
are
 interpreted.
 </p>
 </dd>
@@ -299,8 +296,11 @@
 by default,
 such options are permuted to the front of the operand list
 and are treated as options.
-Also, <code>POSIXLY_CORRECT</code> disables special handling of an
-invalid bracket expression.  See <a 
href="Character-Classes-and-Bracket-Expressions.html#invalid_002dbracket_002dexpr">invalid-bracket-expr</a>.
+</p>
+</dd>
+<dt id='index-TERM-environment-variable'><span><code>TERM</code><a 
href='#index-TERM-environment-variable' class='copiable-anchor'> 
&para;</a></span></dt>
+<dd><p>This variable specifies the output terminal type, which can affect
+what the <samp>--color</samp> option does.  See <a 
href="General-Output-Control.html">General Output Control</a>.
 </p>
 </dd>
 <dt 
id='index-_005fN_005fGNU_005fnonoption_005fargv_005fflags_005f-environment-variable'><span><code>_<var>N</var>_GNU_nonoption_argv_flags_</code><a
 
href='#index-_005fN_005fGNU_005fnonoption_005fargv_005fflags_005f-environment-variable'
 class='copiable-anchor'> &para;</a></span></dt>



reply via email to

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