Home Explore Blog CI



man-pages

10th chunk of `man.man`
a1fad9caf120a438d8434ffe9431a091f5016e5ce48026ac0000000100000aed
 arguments, and may use shell quoting (backslashes, single quotes, or double quotes).  It may not use pipes to connect  multiple  commands;  if  you  need
              that, use a wrapper script, which may take the file to display either as an argument or on standard input.

       MANLESS
              If  $MANLESS  is  set,  its  value will be used as the default prompt string for the less pager, as if it had been passed using the -r option (so any occurrences of the text $MAN_PN will be expanded in the same
              way).  For example, if you want to set the prompt string unconditionally to “my prompt string”, set $MANLESS to ‘-Psmy prompt string’.  Using the -r option overrides this environment variable.

       BROWSER
              If $BROWSER is set, its value is a colon‐delimited list of commands, each of which in turn is used to try to start a web browser for man --html.  In each command, %s is replaced by  a  filename  containing  the
              HTML output from groff, %% is replaced by a single percent sign (%), and %c is replaced by a colon (:).

       SYSTEM If $SYSTEM is set, it will have the same effect as if it had been specified as the argument to the -m option.

       MANOPT If  $MANOPT is set, it will be parsed prior to man’s command line and is expected to be in a similar format.  As all of the other man specific environment variables can be expressed as command line options, and
              are thus candidates for being included in $MANOPT it is expected that they will become obsolete.  N.B.  All spaces that should be interpreted as part of an option’s argument must be escaped.

       MANWIDTH
              If $MANWIDTH is set, its value is used as the line length for which manual pages should be formatted.  If it is not set, manual pages will be formatted with a line length appropriate  to  the  current  terminal
              (using the value of $COLUMNS, and ioctl(2) if available, or falling back to 80 characters if neither is available).  Cat pages will only be saved when the default formatting can be used, that is when the termi‐
              nal line length is between 66 and 80 characters.

       MAN_KEEP_FORMATTING
              Normally,  when  output  is  not  being  directed  to  a  terminal  (such  as  to  a file or a pipe), formatting characters are discarded to make it easier to read the result without special tools.  However, if
              $MAN_KEEP_FORMATTING is set to any non‐empty value, these formatting characters are retained.  This may be useful for wrappers around man that can interpret formatting characters.

       MAN_KEEP_STDERR
              Normally, when output is being directed to a terminal (usually to a pager), any error output from the command used to produce

Title: Environment Variables for Man Page Formatting and Display
Summary
This section describes several environment variables that influence the formatting and display of man pages. These include `MANLESS` for customizing the less pager prompt, `BROWSER` for specifying web browsers to display HTML output, `SYSTEM` for setting the system name, `MANOPT` for pre-parsing command-line options, `MANWIDTH` for setting the line length, `MAN_KEEP_FORMATTING` for retaining formatting characters when output is not directed to a terminal, and `MAN_KEEP_STDERR` for controlling the display of error output.