summaryrefslogtreecommitdiff
path: root/doc/grep.texi
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-11-03 11:09:47 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2020-11-03 11:09:47 -0800
commit790be1fb2a5949277ccc89f8a1c9c49733045d85 (patch)
tree488de6cc3ef46b7d41b91ae529525eb366ec9e91 /doc/grep.texi
parentffc6e407e3657598702ba24ab1ba3a6b8ab253ea (diff)
downloadgrep-790be1fb2a5949277ccc89f8a1c9c49733045d85.tar.gz
grep: remove GREP_OPTIONS
* NEWS: Mention this. * doc/grep.in.1: Remove GREP_OPTIONS documentation. * doc/grep.texi (Environment Variables): Move GREP_OPTIONS stuff into a “no longer implemented” paragraph. * src/grep.c (prepend_args, prepend_default_options): Remove. (main): Do not look at GREP_OPTIONS. * tests/Makefile.am (TESTS_ENVIRONMENTS): * tests/init.cfg (vars_): Remove GREP_OPTIONS.
Diffstat (limited to 'doc/grep.texi')
-rw-r--r--doc/grep.texi32
1 files changed, 14 insertions, 18 deletions
diff --git a/doc/grep.texi b/doc/grep.texi
index 0c0bb124..fce36cdf 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -887,24 +887,6 @@ the @code{terminfo} library.
@table @env
-@item GREP_OPTIONS
-@vindex GREP_OPTIONS @r{environment variable}
-@cindex default options environment variable
-This variable specifies default options to be placed in front of any
-explicit options.
-As this causes problems when writing portable scripts, this feature
-will be removed in a future release of @command{grep}, and @command{grep}
-warns if it is used. Please use an alias or script instead.
-For example, if @command{grep} is in the directory @samp{/usr/bin} you
-can prepend @file{$HOME/bin} to your @env{PATH} and create an
-executable script @file{$HOME/bin/grep} containing the following:
-
-@example
-#! /bin/sh
-export PATH=/usr/bin
-exec grep --color=auto --devices=skip "$@@"
-@end example
-
@item GREP_COLOR
@vindex GREP_COLOR @r{environment variable}
@cindex highlight markers
@@ -1097,6 +1079,20 @@ and only when @env{POSIXLY_CORRECT} is not set.
@end table
+The @env{GREP_OPTIONS} environment variable of @command{grep} 2.20 and
+earlier is no longer supported, as it caused problems when writing
+portable scripts. To make arbitrary changes to how @command{grep}
+works, you can use an alias or script instead. For example, if
+@command{grep} is in the directory @samp{/usr/bin} you can prepend
+@file{$HOME/bin} to your @env{PATH} and create an executable script
+@file{$HOME/bin/grep} containing the following:
+
+@example
+#! /bin/sh
+export PATH=/usr/bin
+exec grep --color=auto --devices=skip "$@@"
+@end example
+
@node Exit Status
@section Exit Status