grep.1: Add an ENVIRONMENT section

Document the environment variables used by grep(1).

Reviewed by:	pauamma, kevans
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D37726
This commit is contained in:
Jose Luis Duran 2022-12-18 08:22:24 +01:00 committed by Gordon Bergling
parent d4b4f3b9c3
commit cf7fe60e63

View File

@ -30,7 +30,7 @@
.\"
.\" @(#)grep.1 8.3 (Berkeley) 4/18/94
.\"
.Dd November 10, 2021
.Dd December 18, 2022
.Dt GREP 1
.Os
.Sh NAME
@ -440,6 +440,22 @@ read from standard input.
This includes both
.Fl f
and file arguments.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Bl -tag -width "GREP_OPTIONS"
.It Ev GREP_COLOR
This variable specifies the color used to highlight matched (non-empty) text.
.It Ev GREP_OPTIONS
This variable specifies default options
to be placed in front of any explicit options.
It may cause problems with portable scripts.
.It Ev TERM
This variable specifies the type name of the terminal, console or display-device
type to be used.
See
.Xr term 7 .
.El
.Sh EXIT STATUS
The
.Nm grep