Home Explore Blog CI



man-pages

7th chunk of `man.man`
d541cadd29239d1290aa535c150efbbb52e821a60b58fedc000000010000100f
 /usr/share/man/man1/diff.1.gz

   Controlling formatted output
       -P pager, --pager=pager
              Specify which output pager to use.  By default, man uses pager, falling back to cat if pager is not found or is not executable.  This option overrides the $MANPAGER environment variable, which in turn overrides
              the $PAGER environment variable.  It is not used in conjunction with -f or -k.

              The value may be a simple command name or a command with 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.

       -r prompt, --prompt=prompt
              If a recent version of less is used as the pager, man will attempt to set its prompt and some sensible options.  The default prompt looks like

               Manual page name(sec) line x

              where name denotes the manual page name, sec denotes the section it was found under and x the current line number.  This is achieved by using the $LESS environment variable.

              Supplying -r with a string will override this default.  The string may contain the text $MAN_PN which will be expanded to the name of the current manual page and its section name surrounded by "(" and ")".  The
              string used to produce the default could be expressed as

              \ Manual\ page\ \$MAN_PN\ ?ltline\ %lt?L/%L.:
              byte\ %bB?s/%s..?\ (END):?pB\ %pB\\%..
              (press h for help or q to quit)

              It  is  broken into three lines here for the sake of readability only.  For its meaning see the less(1) manual page.  The prompt string is first evaluated by the shell.  All double quotes, back‐quotes and back‐
              slashes in the prompt must be escaped by a preceding backslash.  The prompt string may end in an escaped $ which may be followed by further options for less.  By default man sets the -ix8 options.

              The $MANLESS environment variable described below may be used to set a default prompt string if none is supplied on the command line.

       -7, --ascii
              When viewing a pure ascii(7) manual page on a 7 bit terminal or terminal emulator, some characters may not display correctly when using the latin1(7) device description with GNU nroff.  This option allows  pure
              ascii manual pages to be displayed in ascii with the latin1 device.  It will not translate any latin1 text.  The following table shows the translations performed: some parts of it may only be displayed properly
              when using GNU nroff’s latin1(7) device.

              Description           Octal   latin1   ascii
              ─────────────────────────────────────────────
              continuation hyphen    255      ‐        ‐
              bullet (middle dot)    267      •        o
              acute accent           264      ´        ’
              multiplication sign    327      ×        x

              If  the latin1 column displays correctly, your terminal may be set up for latin1 characters and this option is not necessary.  If the latin1 and ascii columns are identical, you are reading this page using this
              option or man did not format this page using the latin1 device description.  If the latin1 column is missing or corrupt, you may need to view manual pages with this option.

              This option is ignored when using options -t, -H, -T, or -Z and may be useless for nroff other than GNU’s.

       -E encoding, --encoding=encoding
              Generate output for a character encoding other than the default.  For backward compatibility, encoding may be an nroff device such as ascii, latin1, or utf8 as well as a true character encoding such as UTF-8.

       --no-hyphenation, --nh
              Normally, nroff will automatically hyphenate text at line

Title: Man Page Output Formatting: Pager Control, ASCII Display, and Encoding Options
Summary
This section explains how to control the formatted output of `man` pages. It covers specifying the output pager (`-P`), customizing the pager prompt (`-r`) using `$MAN_PN` and `$LESS`, handling ASCII display on 7-bit terminals (`-7`), and generating output for different character encodings (`-E`). Additionally, it mentions options to disable hyphenation (`--no-hyphenation`).