Hello Bastien,

On 1/30/21 12:29 AM, roucaries.bast...@gmail.com wrote:
> From: Bastien Roucariès <ro...@debian.org>
> 
> According to man-page (7):
>  ENVIRONMENT
>               A list of all environment variables that affect the program or 
> function and how they affect it.
> 
> Therefore push the list of variables to an ENVIRONMENT section.

The purpose of the ENVIRONMENT section in other page is to
list the EVs that are relevant for the interface, The environ(7)
page does not such section.

On the other hand, I do like the reorganization that is proposed
in the remainder of the patch, and the subsequent restructuring
of the variables in the following patch.

I've applied this patch, but removed the addition of the
ENVIRONMENT heading.

Thanks!

Cheers,

Michael

> 
> Reorder also how to set environment variables to DESCRIPTION instead of after 
> the ENVIRONMENT section
> in order to improve readability.
> 
> Signed-off-by: Bastien Roucariès <ro...@debian.org>
> ---
>  man7/environ.7 | 95 +++++++++++++++++++++++++++-----------------------
>  1 file changed, 52 insertions(+), 43 deletions(-)
> 
> diff --git a/man7/environ.7 b/man7/environ.7
> index d1e86ee8d..9fd3f727f 100644
> --- a/man7/environ.7
> +++ b/man7/environ.7
> @@ -87,7 +87,58 @@ The value can be anything that can be represented as a 
> string.
>  The name and the value may not contain an embedded null byte (\(aq\e0\(aq),
>  since this is assumed to terminate the string.
>  .PP
> -Common examples are:
> +Environment variables may be placed in the shell's environment by the
> +.I export
> +command in
> +.BR sh (1),
> +or by the
> +.I setenv
> +command if you use
> +.BR csh (1).
> +.PP
> +The initial environment of the shell is populated in various ways,
> +such as definitions from
> +.IR /etc/environment
> +that are processed by
> +.BR pam_env (8)
> +for all users at login time (on systems that employ
> +.BR pam (8)).
> +In addition, various shell initialization scripts, such as the system-wide
> +.IR /etc/profile
> +script and per-user initializations script may include commands
> +that add variables to the shell's environment;
> +see the manual page of your preferred shell for details.
> +.PP
> +Bourne-style shells support the syntax
> +.PP
> +    NAME=value command
> +.PP
> +to create an environment variable definition only in the scope
> +of the process that executes
> +.IR command .
> +Multiple variable definitions, separated by white space, may precede
> +.IR command .
> +.PP
> +Arguments may also be placed in the
> +environment at the point of an
> +.BR exec (3).
> +A C program can manipulate its environment using the functions
> +.BR getenv (3),
> +.BR putenv (3),
> +.BR setenv (3),
> +and
> +.BR unsetenv (3).
> +.PP
> +What follows is a list of environment variables typically seen on a
> +system.
> +This list is incomplete and includes only common variables seen
> +by average users in their day-to-day routine.
> +Care should be taken
> +to not conflict with the variables specified in the next sections.
> +Environment variables specific to a particular program or library function
> +are documented in the ENVIRONMENT section of the appropriate manual page.
> +.SH ENVIRONMENT
> +Common examples of environment variables are:
>  .TP
>  .B USER
>  The name of the logged-in user (used by some BSD-derived programs).
> @@ -178,48 +229,6 @@ command shall be valid.
>  .\" The user's preferred utility to browse URLs. Sequence of colon-separated
>  .\" browser commands. See http://www.catb.org/\(tiesr/BROWSER/ .
>  .PP
> -Names may be placed in the shell's environment by the
> -.I export
> -command in
> -.BR sh (1),
> -or by the
> -.I setenv
> -command if you use
> -.BR csh (1).
> -.PP
> -The initial environment of the shell is populated in various ways,
> -such as definitions from
> -.IR /etc/environment
> -that are processed by
> -.BR pam_env (8)
> -for all users at login time (on systems that employ
> -.BR pam (8)).
> -In addition, various shell initialization scripts, such as the system-wide
> -.IR /etc/profile
> -script and per-user initializations script may include commands
> -that add variables to the shell's environment;
> -see the manual page of your preferred shell for details.
> -.PP
> -Bourne-style shells support the syntax
> -.PP
> -    NAME=value command
> -.PP
> -to create an environment variable definition only in the scope
> -of the process that executes
> -.IR command .
> -Multiple variable definitions, separated by white space, may precede
> -.IR command .
> -.PP
> -Arguments may also be placed in the
> -environment at the point of an
> -.BR exec (3).
> -A C program can manipulate its environment using the functions
> -.BR getenv (3),
> -.BR putenv (3),
> -.BR setenv (3),
> -and
> -.BR unsetenv (3).
> -.PP
>  Note that the behavior of many programs and library routines is
>  influenced by the presence or value of certain environment variables.
>  Examples include the following:
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Reply via email to