home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume16 / less5 / part01 / less.man < prev    next >
Encoding:
Text File  |  1988-09-22  |  28.5 KB  |  727 lines

  1.  
  2.  
  3.  
  4.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           less - opposite of more
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           lllleeeessssssss [[[[----[[[[++++]]]]aaaaAAAABBBBccccCCCCddddeeeeEEEEiiiimmmmMMMMnnnnqqqqQQQQuuuuUUUUsssswwww]]]] [[[[----bbbb_N]]]] [[[[----hhhh_N]]]] [[[[----xxxx_N]]]] [[[[----[[[[zzzz]]]]_N]]]]
  13.                [[[[----PPPP[[[[mmmmMMMM====]]]]_s_t_r_i_n_g]]]] [[[[----[[[[llllLLLL]]]]_l_o_g_f_i_l_e]]]] [[[[++++_c_m_d]]]]
  14.                [[[[----tttt_t_a_g]]]] [[[[_f_i_l_e_n_a_m_e]]]]............
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.           _L_e_s_s is a program similar to _m_o_r_e (1), but which allows
  18.           backwards movement in the file as well as forward movement.
  19.           Also, _l_e_s_s does not have to read the entire input file
  20.           before starting, so with large input files it starts up
  21.           faster than text editors like _v_i (1).  _L_e_s_s uses termcap (or
  22.           terminfo on some systems), so it can run on a variety of
  23.           terminals.  There is even limited support for hardcopy
  24.           terminals.  (On a hardcopy terminal, lines which should be
  25.           printed at the top of the screen are prefixed with an up-
  26.           arrow.)
  27.  
  28.           Commands are based on both _m_o_r_e and _v_i. Commands may be
  29.           preceeded by a decimal number, called N in the descriptions
  30.           below.  The number is used by some commands, as indicated.
  31.  
  32.  
  33.      CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  34.           In the following descriptions, ^X means control-X.  ESC
  35.           stands for the ESCAPE key; for example ESC-v means the two
  36.           character sequence "ESCAPE", then "v".
  37.  
  38.           H    Help: display a summary of these commands.  If you
  39.                forget all the other commands, remember this one.
  40.  
  41.           SPACE or f or ^F or ^V
  42.                Scroll forward N lines, default one window (see option
  43.                -z below).  If N is more than the screen size, only the
  44.                final screenful is displayed.  Warning: some systems
  45.                use ^V as a special literalization character.
  46.  
  47.           b or ^B or ESC-v
  48.                Scroll backward N lines, default one window (see option
  49.                -z below).  If N is more than the screen size, only the
  50.                final screenful is displayed.
  51.  
  52.           RETURN or ^N or e or ^E or j or ^J
  53.                Scroll forward N lines, default 1.  The entire N lines
  54.                are displayed, even if N is more than the screen size.
  55.  
  56.           y or ^Y or ^P or k or ^K
  57.                Scroll backward N lines, default 1.  The entire N lines
  58.                are displayed, even if N is more than the screen size.
  59.                Warning: some systems use ^Y as a special job control
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/19/88)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  71.  
  72.  
  73.  
  74.                character.
  75.  
  76.           d or ^D
  77.                Scroll forward N lines, default one half of the screen
  78.                size.  If N is specified, it becomes the new default
  79.                for subsequent d and u commands.
  80.  
  81.           u or ^U
  82.                Scroll backward N lines, default one half of the screen
  83.                size.  If N is specified, it becomes the new default
  84.                for subsequent d and u commands.
  85.  
  86.           r or ^R or ^L
  87.                Repaint the screen.
  88.  
  89.           R    Repaint the screen, discarding any buffered input.
  90.                Useful if the file is changing while it is being
  91.                viewed.
  92.  
  93.           g or < or ESC-<
  94.                Go to line N in the file, default 1 (beginning of
  95.                file).  (Warning: this may be slow if N is large.)
  96.  
  97.           G or > or ESC->
  98.                Go to line N in the file, default the end of the file.
  99.                (Warning: this may be slow if N is large, or if N is
  100.                not specified and standard input, rather than a file,
  101.                is being read.)
  102.  
  103.           p or %
  104.                Go to a position N percent into the file.  N should be
  105.                between 0 and 100.  (This works if standard input is
  106.                being read, but only if _l_e_s_s has already read to the
  107.                end of the file.  It is always fast, but not always
  108.                useful.)
  109.  
  110.           m    Followed by any lowercase letter, marks the current
  111.                position with that letter.
  112.  
  113.           '    (Single quote.) Followed by any lowercase letter,
  114.                returns to the position which was previously marked
  115.                with that letter.  Followed by another single quote,
  116.                returns to the postion at which the last "large"
  117.                movement command was executed.  All marks are lost when
  118.                a new file is examined.
  119.  
  120.           ^X^X Same as single quote.
  121.  
  122.           /pattern
  123.                Search forward in the file for the N-th line containing
  124.                the pattern.  N defaults to 1.  The pattern is a
  125.                regular expression, as recognized by _e_d. The search
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/19/88)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  137.  
  138.  
  139.  
  140.                starts at the second line displayed (but see the -a
  141.                option, which changes this).
  142.  
  143.           ?pattern
  144.                Search backward in the file for the N-th line
  145.                containing the pattern.  The search starts at the line
  146.                immediately before the top line displayed.
  147.  
  148.           /!pattern
  149.                Like /, but the search is for the N-th line which does
  150.                NOT contain the pattern.
  151.  
  152.           ?!pattern
  153.                Like ?, but the search is for the N-th line which does
  154.                NOT contain the pattern.
  155.  
  156.           n    Repeat previous search, for N-th line containing the
  157.                last pattern (or NOT containing the last pattern, if
  158.                the previous search was /! or ?!).
  159.  
  160.           E [filename]
  161.                Examine a new file.  If the filename is missing, the
  162.                "current" file (see the N and P commands below) from
  163.                the list of files in the command line is re-examined.
  164.                If the filename is a pound sign (#), the previously
  165.                examined file is re-examined.
  166.  
  167.           ^X^V or :e
  168.                Same as E.  Warning: some systems use ^V as a special
  169.                literalization character.
  170.  
  171.           N or :n
  172.                Examine the next file (from the list of files given in
  173.                the command line).  If a number N is specified (not to
  174.                be confused with the command N), the N-th next file is
  175.                examined.
  176.  
  177.           P or :p
  178.                Examine the previous file.  If a number N is specified,
  179.                the N-th previous file is examined.
  180.  
  181.           = or ^G
  182.                Prints some information about the file being viewed,
  183.                including its name and the line number and byte offset
  184.                of the bottom line being displayed.  If possible, it
  185.                also prints the length of the file and the percent of
  186.                the file above the last displayed line.
  187.  
  188.           -    Followed by one of the command line option letters (see
  189.                below), this will change the setting of that option and
  190.                print a message describing the new setting.  If the
  191.                option letter has a numeric value (such as -b or -h),
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 7/19/88)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  203.  
  204.  
  205.  
  206.                or a string value (such as -P or -t), a new value may
  207.                be entered after the option letter.
  208.  
  209.           _    (Underscore.) Followed by one of the command line
  210.                option letters (see below), this will print a message
  211.                describing the current setting of that option.  The
  212.                setting of the option is not changed.
  213.  
  214.           +cmd Causes the specified cmd to be executed each time a new
  215.                file is examined.  For example, +G causes _l_e_s_s to
  216.                initially display each file starting at the end rather
  217.                than the beginning.
  218.  
  219.           V    Prints the version number of _l_e_s_s being run.
  220.  
  221.           q or :q or ZZ
  222.                Exits _l_e_s_s.
  223.  
  224.           The following two commands may or may not be valid,
  225.           depending on your particular installation.
  226.  
  227.           v    Invokes an editor to edit the current file being
  228.                viewed.  The editor is taken from the environment
  229.                variable EDITOR, or defaults to "vi".
  230.  
  231.           ! shell-command
  232.                Invokes a shell to run the shell-command given.  A
  233.                percent sign in the command is replaced by the name of
  234.                the current file.  "!!" repeats the last shell command.
  235.                "!" with no shell command simply invokes a shell.  In
  236.                all cases, the shell is taken from the environment
  237.                variable SHELL, or defaults to "sh".
  238.  
  239.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  240.           Command line options are described below.  Most options may
  241.           be changed while _l_e_s_s is running, via the "-" command.
  242.  
  243.           Options are also taken from the environment variable "LESS".
  244.           For example, to avoid typing "less -options ..." each time
  245.           _l_e_s_s is invoked, you might tell _c_s_h:
  246.  
  247.           setenv LESS "-options"
  248.  
  249.           or if you use _s_h:
  250.  
  251.           LESS="-options"; export LESS
  252.  
  253.           The environment variable is parsed before the command line,
  254.           so command line options override the LESS environment
  255.           variable.  If an option appears in the LESS variable, it can
  256.           be reset to its default on the command line by beginning the
  257.           command line option with "-+".
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 7/19/88)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  269.  
  270.  
  271.  
  272.           A dollar sign ($) may be used to signal the end of an option
  273.           string.  This is important only for options like -P which
  274.           take a following string.
  275.  
  276.           -a   Normally, forward searches start just after the top
  277.                displayed line (that is, at the second displayed line).
  278.                Thus, forward searches include the currently displayed
  279.                screen.  The -a option causes forward searches to start
  280.                just after the bottom line displayed, thus skipping the
  281.                currently displayed screen.
  282.  
  283.           -A   The -A option causes searches to start at the second
  284.                SCREEN line displayed, as opposed to the default which
  285.                is to start at the second REAL line displayed.  For
  286.                example, suppose a long real line occupies the first
  287.                three screen lines.  The default search will start at
  288.                the second real line (the fourth screen line), while
  289.                the -A option will cause the search to start at the
  290.                second screen line (in the midst of the first real
  291.                line).  (This option is rarely useful.)
  292.  
  293.           -b   The -b_n option tells _l_e_s_s to use a non-standard number
  294.                of buffers.  Buffers are 1K, and normally 10 buffers
  295.                are used (except if data in coming from standard input;
  296.                see the -B option).  The number _n specifies a different
  297.                number of buffers to use.
  298.  
  299.           -B   Normally, when data is coming from standard input,
  300.                buffers are allocated automatically as needed, to avoid
  301.                loss of data.  The -B option disables this feature, so
  302.                that only the default number of buffers are used.  If
  303.                more data is read than will fit in the buffers, the
  304.                oldest data is discarded.
  305.  
  306.           -c   Normally, _l_e_s_s will repaint the screen by scrolling
  307.                from the bottom of the screen.  If the -c option is
  308.                set, when _l_e_s_s needs to change the entire display, it
  309.                will paint from the top line down.
  310.  
  311.           -C   The -C option is like -c, but the screen is cleared
  312.                before it is repainted.
  313.  
  314.           -d   Normally, _l_e_s_s will complain if the terminal is dumb;
  315.                that is, lacks some important capability, such as the
  316.                ability to clear the screen or scroll backwards.  The
  317.                -d option suppresses this complaint (but does not
  318.                otherwise change the behavior of the program on a dumb
  319.                terminal).
  320.  
  321.           -e   Normally the only way to exit less is via the "q"
  322.                command.  The -e option tells less to automatically
  323.                exit the second time it reaches end-of-file.
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 7/19/88)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  335.  
  336.  
  337.  
  338.           -E   The -E flag causes less to exit the first time it
  339.                reaches end-of-file.
  340.  
  341.           -h   Normally, _l_e_s_s will scroll backwards when backwards
  342.                movement is necessary.  The -h option specifies a
  343.                maximum number of lines to scroll backwards.  If it is
  344.                necessary to move backwards more than this many lines,
  345.                the screen is repainted in a forward direction.  (If
  346.                the terminal does not have the ability to scroll
  347.                backwards, -h0 is implied.)
  348.  
  349.           -i   The -i option causes searches to ignore case; that is,
  350.                uppercase and lowercase are considered identical.
  351.                Also, text which is overstruck or underlined can be
  352.                searched for.
  353.  
  354.           -l   The -l option, followed immediately by a filename, will
  355.                cause _l_e_s_s to copy its input to the named file as it is
  356.                being viewed.  This applies only when the input file is
  357.                a pipe, not an ordinary file.  If the file already
  358.                exists, less will ask for confirmation before
  359.                overwriting it.
  360.  
  361.           -L   The -L option is like -l, but it will overwrite an
  362.                existing file without asking for confirmation.
  363.  
  364.                If no log file has been specified, the -l and -L
  365.                options can be used from within less to specify a log
  366.                file.  Without a file name, they will simply report the
  367.                name of the log file.
  368.  
  369.           -m   Normally, _l_e_s_s prompts with a colon.  The -m option
  370.                causes _l_e_s_s to prompt verbosely (like _m_o_r_e), with the
  371.                percent into the file.
  372.  
  373.           -M   The -M option causes _l_e_s_s to prompt even more verbosely
  374.                than _m_o_r_e.
  375.  
  376.           -n   The -n flag suppresses line numbers.  The default (to
  377.                use line numbers) may cause _l_e_s_s to run more slowly in
  378.                some cases, especially with a very large input file.
  379.                Suppressing line numbers with the -n flag will avoid
  380.                this problem.  Using line numbers means: the line
  381.                number will be displayed in the verbose prompt and in
  382.                the = command, and the v command will pass the current
  383.                line number to the editor.
  384.  
  385.           -P   The -P option provides a way to tailor the three prompt
  386.                styles to your own preference.  You would normally put
  387.                this option in your LESS environment variable, rather
  388.                than type it in with each less command.  Such an option
  389.                must either be the last option in the LESS variable, or
  390.  
  391.  
  392.  
  393.      Page 6                                          (printed 7/19/88)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  401.  
  402.  
  403.  
  404.                be terminated by a dollar sign.  -P followed by a
  405.                string changes the default (short) prompt to that
  406.                string.  -Pm changes the medium (-m) prompt to the
  407.                string, and -PM changes the long (-M) prompt.  Also,
  408.                -P= changes the message printed by the = command to the
  409.                given string.  All prompt strings consist of a sequence
  410.                of letters and special escape sequences.  See the
  411.                section on PROMPTS for more details.
  412.  
  413.           -q   Normally, if an attempt is made to scroll past the end
  414.                of the file or before the beginning of the file, the
  415.                terminal bell is rung to indicate this fact.  The -q
  416.                option tells _l_e_s_s not to ring the bell at such times.
  417.                If the terminal has a "visual bell", it is used
  418.                instead.
  419.  
  420.           -Q   Even if -q is given, _l_e_s_s will ring the bell on certain
  421.                other errors, such as typing an invalid character.  The
  422.                -Q option tells _l_e_s_s to be quiet all the time; that is,
  423.                never ring the terminal bell.  If the terminal has a
  424.                "visual bell", it is used instead.
  425.  
  426.           -s   The -s option causes consecutive blank lines to be
  427.                squeezed into a single blank line.  This is useful when
  428.                viewing _n_r_o_f_f output.
  429.  
  430.           -t   The -t option, followed immediately by a TAG, will edit
  431.                the file containing that tag.  For this to work, there
  432.                must be a file called "tags" in the current directory,
  433.                which was previously built by the _c_t_a_g_s (1) command.
  434.                This option may also be specified from within less
  435.                (using the - command) as a way of examining a new file.
  436.  
  437.           -u   If the -u option is given, backspaces are treated as
  438.                printable characters; that is, they are sent to the
  439.                terminal when they appear in the input.
  440.  
  441.           -U   If the -U option is given, backspaces are printed as
  442.                the two character sequence "^H".
  443.  
  444.                If neither -u nor -U is given, backspaces which appear
  445.                adjacent to an underscore character are treated
  446.                specially: the underlined text is displayed using the
  447.                terminal's hardware underlining capability.  Also,
  448.                backspaces which appear between two identical
  449.                characters are treated specially: the overstruck text
  450.                is printed using the terminal's hardware boldface
  451.                capability.  Other backspaces are deleted, along with
  452.                the preceeding character.
  453.  
  454.           -w   Normally, _l_e_s_s uses a tilde character to represent
  455.                lines past the end of the file.  The -w option causes
  456.  
  457.  
  458.  
  459.      Page 7                                          (printed 7/19/88)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  467.  
  468.  
  469.  
  470.                blank lines to be used instead.
  471.  
  472.           -x   The -x_n option sets tab stops every _n positions.  The
  473.                default for _n is 8.
  474.  
  475.           -[z] When given a backwards or forwards window command, _l_e_s_s
  476.                will by default scroll backwards or forwards one
  477.                screenful of lines. The -z_n option changes the default
  478.                scrolling window size to _n lines.  Note that the "z" is
  479.                optional for compatibility with _m_o_r_e.
  480.  
  481.           +    If a command line option begins with ++++, the remainder
  482.                of that option is taken to be an initial command to
  483.                _l_e_s_s. For example, +G tells _l_e_s_s to start at the end of
  484.                the file rather than the beginning, and +/xyz tells it
  485.                to start at the first occurence of "xyz" in the file.
  486.                As a special case, +<number> acts like +<number>g; that
  487.                is, it starts the display at the specified line number
  488.                (however, see the caveat under the "g" command above).
  489.                If the option starts with ++++++++, the initial command
  490.                applies to every file being viewed, not just the first
  491.                one.  The + command described previously may also be
  492.                used to set (or change) an initial command for every
  493.                file.
  494.  
  495.  
  496.      KKKKEEEEYYYY BBBBIIIINNNNDDDDIIIINNNNGGGGSSSS
  497.           You may define your own less commands by using the program
  498.           _l_e_s_s_k_e_y (1) to create a file called ".less" in your home
  499.           directory.  This file specifies a set of command keys and an
  500.           action associated with each key.  See the _l_e_s_s_k_e_y manual
  501.           page for more details.
  502.  
  503.  
  504.      PPPPRRRROOOOMMMMPPPPTTTTSSSS
  505.           The -P option allows you to tailor the prompt to your
  506.           preference.  The string given to the -P option replaces the
  507.           specified prompt string.  Certain characters in the string
  508.           are interpreted specially.  The prompt mechanism is rather
  509.           complicated to provide flexibility, but the ordinary user
  510.           need not understand the details of constructing personalized
  511.           prompt strings.
  512.  
  513.           A percent sign followed by a single character is expanded
  514.           according to what the following character is:
  515.  
  516.           %bX  Replaced by the byte offset into the current input
  517.                file.  The b is followed by a single character (shown
  518.                as X above) which specifies the line whose byte offset
  519.                is to be used.  If the character is a "t", the byte
  520.                offset of the top line in the display is used, an "m"
  521.                means use the middle line, a "b" means use the bottom
  522.  
  523.  
  524.  
  525.      Page 8                                          (printed 7/19/88)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  533.  
  534.  
  535.  
  536.                line, and a "B" means use the line just after the
  537.                bottom line.
  538.  
  539.           %f   Replaced by the name of the current input file.
  540.  
  541.           %i   Replaced by the index of the current file in the list
  542.                of input files.
  543.  
  544.           %lX  Replaced by the line number of a line in the input
  545.                file.  The line to be used is determined by the X, as
  546.                with the %b option.
  547.  
  548.           %m   Replaced by the total number of input files.
  549.  
  550.           %pX  Replaced by the percent into the current input file.
  551.                The line used is determined by the X as with the %b
  552.                option.
  553.  
  554.           %s   Replaced by the size of the current input file.
  555.  
  556.           %t   Causes any trailing spaces to be removed.  Usually used
  557.                at the end of the string, but may appear anywhere.
  558.  
  559.           %x   Replaced by the name of the next input file in the
  560.                list.
  561.  
  562.           If any item is unknown (for example, the file size if input
  563.           is a pipe), a question mark is printed instead.
  564.  
  565.           The format of the prompt string can be changed depending on
  566.           certain conditions.  A question mark followed by a single
  567.           character acts like an "IF": depending on the following
  568.           character, a condition is evaluated.  If the condition is
  569.           true, any characters following the question mark and
  570.           condition character, up to a period, are included in the
  571.           prompt.  If the condition is false, such characters are not
  572.           included.  A colon appearing between the question mark and
  573.           the period can be used to establish an "ELSE": any
  574.           characters between the colon and the period are included in
  575.           the string if and only if the IF condition is false.
  576.           Condition characters (which follow a question mark) may be:
  577.  
  578.           ?a   True if any characters have been included in the prompt
  579.                so far.
  580.  
  581.           ?bX  True if the byte offset of the specified line is known.
  582.  
  583.           ?e   True if at end-of-file.
  584.  
  585.           ?f   True if there is an input filename (that is, if input
  586.                is not a pipe).
  587.  
  588.  
  589.  
  590.  
  591.      Page 9                                          (printed 7/19/88)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  599.  
  600.  
  601.  
  602.           ?lX  True if the line number of the specified line is known.
  603.  
  604.           ?m   True if there is more than one input file.
  605.  
  606.           ?n   True if this is the first prompt in a new input file.
  607.  
  608.           ?pX  True if the percent into the current input file of the
  609.                specified line is known.
  610.  
  611.           ?s   True if the size of current input file is known.
  612.  
  613.           ?x   True if there is a next input file (that is, if the
  614.                current input file is not the last one).
  615.  
  616.           Any characters other than the special ones (question mark,
  617.           colon, period, percent, and backslash) become literally part
  618.           of the prompt.  Any of the special characters may be
  619.           included in the prompt literally by preceeding it with a
  620.           backslash.
  621.  
  622.           Some examples:
  623.  
  624.           ?f%f:Standard input.
  625.  
  626.           This prompt prints the filename, if known; otherwise the
  627.           string "Standard input".
  628.  
  629.           ?f%f .?ltLine %lt:?pt%pt:?btByte %bt:-...
  630.  
  631.           This prompt would print the filename, if known.  The
  632.           filename is followed by the line number, if known, otherwise
  633.           the percent if known, otherwise the byte offset if known.
  634.           Otherwise, a dash is printed.  Notice how each question mark
  635.           has a matching period, and how the % after the %pt is
  636.           included literally by escaping it with a backslash.
  637.  
  638.           ?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x..%t
  639.  
  640.           This prints the filename if this is the first prompt in a
  641.           file, followed by the "file N of N" message if there is more
  642.           than one input file.  Then, if we are at end-of-file, the
  643.           string "(END)" is printed followed by the name of the next
  644.           file, if there is one.  Finally, any trailing spaces are
  645.           truncated.  This is the default prompt.  For reference, here
  646.           are the defaults for the other two prompts (-m and -M
  647.           respectively).  Each is broken into two lines here for
  648.           readability only.
  649.  
  650.           ?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x.:
  651.                ?pB%pB\%:byte %bB?s/%s...%t
  652.  
  653.           ?f%f .?n?m(file %i of %m) ..?ltline %lt :byte %bB?s/%s ..
  654.  
  655.  
  656.  
  657.      Page 10                                         (printed 7/19/88)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      LLLLEEEESSSSSSSS((((1111))))                     UUUUNNNNIIIIXXXX 5555....0000                      LLLLEEEESSSSSSSS((((1111))))
  665.  
  666.  
  667.  
  668.                ?e(END) ?x- Next\: %x.:?pB%pB\%..%t
  669.  
  670.           And here is the default message produced by the = command:
  671.  
  672.           ?f%f .?m(file %i of %m) .?ltline %lt .
  673.                byte %bB?s/%s. ?e(END) :?pB%pB\%..%t
  674.  
  675.  
  676.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  677.           lesskey(1)
  678.  
  679.  
  680.      WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS
  681.           The = command and prompts (unless changed by -P) report the
  682.           line number of the line at the top of the screen, but the
  683.           byte and percent of the line at the bottom of the screen.
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.      Page 11                                         (printed 7/19/88)
  724.  
  725.  
  726.  
  727.