From 790be1fb2a5949277ccc89f8a1c9c49733045d85 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 3 Nov 2020 11:09:47 -0800 Subject: grep: remove GREP_OPTIONS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- doc/grep.texi | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'doc/grep.texi') 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 -- cgit v1.2.1