home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 036 / less232.zip / LESS.MAN < prev    next >
Text File  |  1994-09-13  |  51KB  |  1,387 lines

  1.  
  2.  
  3.  
  4. LESS(1)                  USER COMMANDS                    LESS(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      less - opposite of more
  10.  
  11. SYNOPSIS
  12.      less -?
  13.      less [-[+]aBcCdeEfHimMnNqQrsSuUw]
  14.           [-b _b_u_f_s] [-h _l_i_n_e_s] [-j _l_i_n_e] [-k _k_e_y_f_i_l_e]
  15.           [-{oO} _l_o_g_f_i_l_e] [-p _p_a_t_t_e_r_n] [-P _p_r_o_m_p_t] [-t _t_a_g]
  16.           [-T _t_a_g_f_i_l_e] [-x _t_a_b] [-y _l_i_n_e_s] [-[z] _l_i_n_e_s]
  17.           [+[+]_c_m_d] [_f_i_l_e_n_a_m_e]...
  18.  
  19.  
  20. DESCRIPTION
  21.      _L_e_s_s is a program similar to  _m_o_r_e  (1),  but  which  allows
  22.      backward  movement  in the file as well as forward movement.
  23.      Also, _l_e_s_s does not have  to  read  the  entire  input  file
  24.      before starting, so with large input files it starts up fas-
  25.      ter than text editors like _v_i (1).  _L_e_s_s  uses  termcap  (or
  26.      terminfo  on  some  systems),  so it can run on a variety of
  27.      terminals.  There is even limited support for hardcopy  ter-
  28.      minals.   (On  a  hardcopy  terminal,  lines which should be
  29.      printed at the top of the screen are prefixed with a caret.)
  30.  
  31.      Commands are based on both _m_o_r_e and _v_i. Commands may be pre-
  32.      ceded  by  a  decimal  number,  called N in the descriptions
  33.      below.  The number is used by some commands, as indicated.
  34.  
  35.  
  36. COMMANDS
  37.      In the following  descriptions,  ^X  means  control-X.   ESC
  38.      stands  for  the ESCAPE key; for example ESC-v means the two
  39.      character sequence "ESCAPE", then "v".
  40.  
  41.      h or H
  42.           Help: display a summary of these commands.  If you for-
  43.           get all the other commands, remember this one.
  44.  
  45.      SPACE or ^V or f or ^F
  46.           Scroll forward N lines, default one window (see  option
  47.           -z below).  If N is more than the screen size, only the
  48.           final screenful is displayed.   Warning:  some  systems
  49.           use ^V as a special literalization character.
  50.  
  51.      z    Like SPACE, but if N is specified, it becomes  the  new
  52.           window size.
  53.  
  54.      RETURN or ^N or e or ^E or j or ^J
  55.           Scroll forward N lines, default 1.  The entire N  lines
  56.           are displayed, even if N is more than the screen size.
  57.  
  58.      d or ^D
  59.           Scroll forward N lines, default one half of the  screen
  60.  
  61.  
  62.  
  63.                                                                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LESS(1)                  USER COMMANDS                    LESS(1)
  71.  
  72.  
  73.  
  74.           size.   If  N  is specified, it becomes the new default
  75.           for subsequent d and u commands.
  76.  
  77.      b or ^B or ESC-v
  78.           Scroll backward N lines, default one window (see option
  79.           -z below).  If N is more than the screen size, only the
  80.           final screenful is displayed.
  81.  
  82.      w    Like ESC-v, but if N is specified, it becomes  the  new
  83.           window size.
  84.  
  85.      y or ^Y or ^P or k or ^K
  86.           Scroll backward N lines, default 1.  The entire N lines
  87.           are  displayed, even if N is more than the screen size.
  88.           Warning: some systems use ^Y as a special  job  control
  89.           character.
  90.  
  91.      u or ^U
  92.           Scroll backward N lines, default one half of the screen
  93.           size.   If  N  is specified, it becomes the new default
  94.           for subsequent d and u commands.
  95.  
  96.      r or ^R or ^L
  97.           Repaint the screen.
  98.  
  99.      R    Repaint the  screen,  discarding  any  buffered  input.
  100.           Useful  if  the  file  is  changing  while  it is being
  101.           viewed.
  102.  
  103.      F    Scroll forward, and keep trying to read when the end of
  104.           file  is  reached.  Normally this command would be used
  105.           when already at the end of the file.  It is  a  way  to
  106.           monitor the tail of a file which is growing while it is
  107.           being viewed.  (The behavior is similar  to  the  "tail
  108.           -f" command.)
  109.  
  110.      g or < or ESC-<
  111.           Go to line N in  the  file,  default  1  (beginning  of
  112.           file).  (Warning: this may be slow if N is large.)
  113.  
  114.      G or > or ESC->
  115.           Go to line N in the file, default the end of the  file.
  116.           (Warning:  this  may  be slow if N is large, or if N is
  117.           not specified and standard input, rather than  a  file,
  118.           is being read.)
  119.  
  120.      p or %
  121.           Go to a position N percent into the file.  N should  be
  122.           between  0  and  100.  (This works if standard input is
  123.           being read, but only if _l_e_s_s has already  read  to  the
  124.           end  of  the  file.   It is always fast, but not always
  125.           useful.)
  126.  
  127.  
  128.  
  129.                                                                 2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LESS(1)                  USER COMMANDS                    LESS(1)
  137.  
  138.  
  139.  
  140.      {    If a  left  curly  bracket  appears  in  the  top  line
  141.           displayed  on  the screen, the { command will go to the
  142.           matching right curly bracket.  The matching right curly
  143.           bracket is positioned on the bottom line of the screen.
  144.           If there is more than one left curly bracket on the top
  145.           line,  a  number  N  may  be  used  to specify the N-th
  146.           bracket on the line.
  147.  
  148.      }    If a right curly bracket appears  in  the  bottom  line
  149.           displayed  on  the screen, the } command will go to the
  150.           matching left curly bracket.  The matching  left  curly
  151.           bracket  is  positioned  on the top line of the screen.
  152.           If there is more than one right curly  bracket  on  the
  153.           top  line,  a  number N may be used to specify the N-th
  154.           bracket on the line.
  155.  
  156.      (    Like {, but applies to parentheses  rather  than  curly
  157.           brackets.
  158.  
  159.      )    Like }, but applies to parentheses  rather  than  curly
  160.           brackets.
  161.  
  162.      [    Like {, but applies  to  square  brackets  rather  than
  163.           curly brackets.
  164.  
  165.      ]    Like }, but applies  to  square  brackets  rather  than
  166.           curly brackets.
  167.  
  168.      ESC-^F
  169.           Followed by two characters, acts like {, but  uses  the
  170.           two  characters  as  open  and  close brackets, respec-
  171.           tively.  For example, "ESC ^F < >" could be used to  go
  172.           forward  to  the  >  which  matches  the  <  in the top
  173.           displayed line.
  174.  
  175.      ESC-^B
  176.           Followed by two characters, acts like }, but  uses  the
  177.           two  characters  as  open  and  close brackets, respec-
  178.           tively.  For example, "ESC ^B < >" could be used to  go
  179.           backward  to  the  <  which matches the > in the bottom
  180.           displayed line.
  181.  
  182.      m    Followed by any lowercase  letter,  marks  the  current
  183.           position with that letter.
  184.  
  185.      '    (Single  quote.)  Followed  by  any  lowercase  letter,
  186.           returns  to  the  position  which was previously marked
  187.           with that letter.  Followed by  another  single  quote,
  188.           returns to the position at which the last "large" move-
  189.           ment command was executed.  Followed by a ^ or $, jumps
  190.           to  the  beginning  or  end  of  the file respectively.
  191.           Marks are preserved when a new file is examined, so the
  192.  
  193.  
  194.  
  195.                                                                 3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. LESS(1)                  USER COMMANDS                    LESS(1)
  203.  
  204.  
  205.  
  206.           ' command can be used to switch between input files.
  207.  
  208.      ^X^X Same as single quote.
  209.  
  210.      /pattern
  211.           Search forward in the file for the N-th line containing
  212.           the  pattern.  N defaults to 1.  The pattern is a regu-
  213.           lar expression, as recognized by _e_d. The search  starts
  214.           at  the  second  line  displayed (but see the -a and -j
  215.           options, which change this).
  216.  
  217.           Certain characters are special if entered at the begin-
  218.           ning  of  the  pattern;  they modify the type of search
  219.           rather than become part of the pattern:
  220.  
  221.           !    Search for lines which do NOT match the pattern.
  222.  
  223.           *    Search multiple files.  That  is,  if  the  search
  224.                reaches  the end of the current file without find-
  225.                ing a match, the search continues in the next file
  226.                in the command line list.
  227.  
  228.           @    Begin the search at the first line  of  the  first
  229.                file  in the command line list, regardless of what
  230.                is currently displayed on the screen or  the  set-
  231.                tings of the -a or -j options.
  232.  
  233.      ?pattern
  234.           Search backward in the file for the N-th line  contain-
  235.           ing the pattern.  The search starts at the line immedi-
  236.           ately before the top line displayed.
  237.  
  238.           Certain characters are special as in the / command:
  239.  
  240.           !    Search for lines which do NOT match the pattern.
  241.  
  242.           *    Search multiple files.  That  is,  if  the  search
  243.                reaches  the beginning of the current file without
  244.                finding a match, the search continues in the  pre-
  245.                vious file in the command line list.
  246.  
  247.           @    Begin the search at the last line of the last file
  248.                in  the  command  line list, regardless of what is
  249.                currently displayed on the screen or the  settings
  250.                of the -a or -j options.
  251.  
  252.      ESC-/pattern
  253.           Same as "/*".
  254.  
  255.      ESC-?pattern
  256.           Same as "?*".
  257.  
  258.  
  259.  
  260.  
  261.                                                                 4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. LESS(1)                  USER COMMANDS                    LESS(1)
  269.  
  270.  
  271.  
  272.      n    Repeat previous search, for N-th  line  containing  the
  273.           last  pattern.   If the previous search was modified by
  274.           !, the search is made for the N-th line NOT  containing
  275.           the pattern.  If the previous search was modified by *,
  276.           the search continues in the next (or previous) file  if
  277.           not  satisfied in the current file.  There is no effect
  278.           if the previous search was modified by @.
  279.  
  280.      N    Repeat previous search, but in the reverse direction.
  281.  
  282.      ESC-n
  283.           Repeat previous search, but crossing  file  boundaries.
  284.           The  effect  is as if the previous search were modified
  285.           by *.
  286.  
  287.      ESC-N
  288.           Repeat previous search, but in  the  reverse  direction
  289.           and crossing file boundaries.
  290.  
  291.      ESC-u
  292.           Undo search highlighting.   Turn  off  highlighting  of
  293.           strings   matching   the  current  search  pattern.  If
  294.           highlighting is already off because of a previous ESC-u
  295.           command, turn highlighting back on.  Any search command
  296.           will also turn highlighting back on.  (Highlighting can
  297.           also  be disabled by toggling the -F flag; in that case
  298.           search commands do not turn highlighting back on.)
  299.  
  300.      :e [filename]
  301.           Examine a new file.  If the filename  is  missing,  the
  302.           "current"  file (see the :n and :p commands below) from
  303.           the list of files in the command line  is  re-examined.
  304.           A  percent  sign (%) in the filename is replaced by the
  305.           name of the current file. A pound sign (#) is  replaced
  306.           by  the  name  of  the  previously  examined file.  The
  307.           filename is inserted into  the  command  line  list  of
  308.           files  so  that  it can be seen by subsequent :n and :p
  309.           commands.  If the filename consists of  several  files,
  310.           they  are  all  inserted into the list of files and the
  311.           first one is examined.
  312.  
  313.      ^X^V or E
  314.           Same as :e.  Warning: some systems use ^V as a  special
  315.           literalization character.
  316.  
  317.      :n   Examine the next file (from the list of files given  in
  318.           the  command line).  If a number N is specified, the N-
  319.           th next file is examined.
  320.  
  321.      :p   Examine the previous file in the command line list.  If
  322.           a  number  N  is  specified,  the N-th previous file is
  323.           examined.
  324.  
  325.  
  326.  
  327.                                                                 5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. LESS(1)                  USER COMMANDS                    LESS(1)
  335.  
  336.  
  337.  
  338.      :x   Examine the first file in the command line list.  If  a
  339.           number  N  is  specified,  the N-th file in the list is
  340.           examined.
  341.  
  342.      = or ^G or :f
  343.           Prints some information about the  file  being  viewed,
  344.           including  its name and the line number and byte offset
  345.           of the bottom line being displayed.   If  possible,  it
  346.           also prints the length of the file, the number of lines
  347.           in the file and the percent of the file above the  last
  348.           displayed line.
  349.  
  350.      -    Followed by one of the command line option letters (see
  351.           below), this will change the setting of that option and
  352.           print a message describing the  new  setting.   If  the
  353.           option  letter  has a numeric value (such as -b or -h),
  354.           or a string value (such as -P or -t), a new  value  may
  355.           be entered after the option letter.  If no new value is
  356.           entered, a message describing the  current  setting  is
  357.           printed and nothing is changed.
  358.  
  359.      -+   Followed by one of the command line option letters (see
  360.           below),  this will reset the option to its default set-
  361.           ting and print a message describing  the  new  setting.
  362.           (The  "-+_X" command does the same thing as "-+_X" on the
  363.           command line.) This does  not  work  for  string-valued
  364.           options.
  365.  
  366.      --   Followed by one of the command line option letters (see
  367.           below), this will reset the option to the "opposite" of
  368.           its default setting and print a message describing  the
  369.           new setting.  (The "--_X" command does the same thing as
  370.           "-_X" on the command  line.)  This  does  not  work  for
  371.           numeric or string-valued options.
  372.  
  373.      _    (Underscore.) Followed  by  one  of  the  command  line
  374.           option  letters  (see below), this will print a message
  375.           describing the current setting  of  that  option.   The
  376.           setting of the option is not changed.
  377.  
  378.      +cmd Causes the specified cmd to be executed each time a new
  379.           file  is examined.  For example, +G causes _l_e_s_s to ini-
  380.           tially display each file starting  at  the  end  rather
  381.           than the beginning.
  382.  
  383.      V    Prints the version number of _l_e_s_s being run.
  384.  
  385.      q or :q or :Q or ZZ
  386.           Exits _l_e_s_s.
  387.  
  388.      The following three  commands  may  or  may  not  be  valid,
  389.      depending on your particular installation.
  390.  
  391.  
  392.  
  393.                                                                 6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. LESS(1)                  USER COMMANDS                    LESS(1)
  401.  
  402.  
  403.  
  404.      v    Invokes an  editor  to  edit  the  current  file  being
  405.           viewed.  The editor is taken from the environment vari-
  406.           able EDITOR, or defaults to "vi".  See also the discus-
  407.           sion of LESSEDIT under the section on PROMPTS below.
  408.  
  409.      ! shell-command
  410.           Invokes a shell to run the shell-command given.  A per-
  411.           cent sign (%) in the command is replaced by the name of
  412.           the current file. A pound sign (#) is replaced  by  the
  413.           name of the previously examined file.  "!!" repeats the
  414.           last shell command.  "!" with no shell  command  simply
  415.           invokes a shell.  In all cases, the shell is taken from
  416.           the environment variable SHELL, or defaults to "sh".
  417.  
  418.      | <m> shell-command
  419.           <m> represents any mark letter.  Pipes a section of the
  420.           input  file to the given shell command.  The section of
  421.           the file to be piped is between the first line  on  the
  422.           current  screen  and the position marked by the letter.
  423.           <m> may also be ^ or $ to indicate beginning or end  of
  424.           file respectively.  If <m> is . or newline, the current
  425.           screen is piped.
  426.  
  427. OPTIONS
  428.      Command line options are described below.  Most options  may
  429.      be changed while _l_e_s_s is running, via the "-" command.
  430.  
  431.      Options are also taken from the environment variable "LESS".
  432.      For  example,  to avoid typing "less -options ..." each time
  433.      _l_e_s_s is invoked, you might tell _c_s_h:
  434.  
  435.      setenv LESS "-options"
  436.  
  437.      or if you use _s_h:
  438.  
  439.      LESS="-options"; export LESS
  440.  
  441.      The environment variable is parsed before the command  line,
  442.      so  command line options override the LESS environment vari-
  443.      able.  If an option appears in the LESS variable, it can  be
  444.      reset  to  its  default on the command line by beginning the
  445.      command line option with "-+".
  446.  
  447.      A dollar sign ($) may be used to signal the end of an option
  448.      string.   This  is  important only for options like -P which
  449.      take a following string.
  450.  
  451.      -?   This option displays a summary of the commands accepted
  452.           by _l_e_s_s (the same as the h command).  If this option is
  453.           given, all other options are ignored,  and  _l_e_s_s  exits
  454.           after  the  help  screen  is viewed.  (Depending on how
  455.           your shell interprets the  question  mark,  it  may  be
  456.  
  457.  
  458.  
  459.                                                                 7
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. LESS(1)                  USER COMMANDS                    LESS(1)
  467.  
  468.  
  469.  
  470.           necessary to quote the question mark, thus: "-\?".)
  471.  
  472.      -a   Causes searches to start after the last line  displayed
  473.           on the screen, thus skipping all lines displayed on the
  474.           screen.  By default, searches start at the second  line
  475.           on the screen (or after the last found line; see the -j
  476.           option).
  477.  
  478.      -b_n  Causes _l_e_s_s to use a non-standard  number  of  buffers.
  479.           Buffers  are  1K,  and  by  default 10 buffers are used
  480.           (except if data in coming from standard input; see  the
  481.           -B  option).  The number _n specifies a different number
  482.           of buffers to use.
  483.  
  484.      -B   Disables automatic allocation of buffers, so that  only
  485.           the  default  number of buffers are used.  If more data
  486.           is read than will fit in the buffers, the  oldest  data
  487.           is  discarded.   By  default,  when data is coming from
  488.           standard input, buffers are allocated automatically  as
  489.           needed to avoid loss of data.
  490.  
  491.      -c   Causes full screen repaints to be painted from the  top
  492.           line  down.   By default, full screen repaints are done
  493.           by scrolling from the bottom of the screen.
  494.  
  495.      -C   The -C option is like -c, but  the  screen  is  cleared
  496.           before it is repainted.
  497.  
  498.      -d   The -d option suppresses  the  error  message  normally
  499.           displayed  if the terminal is dumb; that is, lacks some
  500.           important capability, such as the ability to clear  the
  501.           screen or scroll backward.  The -d option does not oth-
  502.           erwise change the behavior of _l_e_s_s on a dumb terminal).
  503.  
  504.      -Dx_c_o_l_o_r
  505.           [MS-DOS only] Sets the color of the text displayed.   x
  506.           is  a  single  character which selects the type of text
  507.           whose color is being set: n=normal, s=standout, d=bold,
  508.           u=underlined,  k=blink.   _c_o_l_o_r  is  a  pair of numbers
  509.           separated by a period. The  first  number  selects  the
  510.           foreground  color and the second selects the background
  511.           color of the text.  A single number _N is  the  same  as
  512.           _N._0.
  513.  
  514.      -e   Causes _l_e_s_s to automatically exit the  second  time  it
  515.           reaches  end-of-file.  By default, the only way to exit
  516.           _l_e_s_s is via the "q" command.
  517.  
  518.      -E   Causes _l_e_s_s to automatically exit  the  first  time  it
  519.           reaches end-of-file.
  520.  
  521.      -f   Forces non-regular files to be opened.  (A  non-regular
  522.  
  523.  
  524.  
  525.                                                                 8
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. LESS(1)                  USER COMMANDS                    LESS(1)
  533.  
  534.  
  535.  
  536.           file  is  a  directory  or a device special file.) Also
  537.           suppresses the warning message when a  binary  file  is
  538.           opened.   By  default,  _l_e_s_s  will  refuse to open non-
  539.           regular files.
  540.  
  541.      -F   Normally, _l_e_s_s will highlight all strings  which  match
  542.           the current search pattern, by displaying them in stan-
  543.           dout mode.  The -F flag suppresses this highlighting.
  544.  
  545.      -h_n  Specifies a maximum number of lines to scroll backward.
  546.           If  it  is  necessary  to  scroll  backward more than _n
  547.           lines, the screen is repainted in a  forward  direction
  548.           instead.  (If the terminal does not have the ability to
  549.           scroll backward, -h0 is implied.)
  550.  
  551.      -i   Causes searches to ignore case; that is, uppercase  and
  552.           lowercase  are  considered  identical.   This option is
  553.           ignored if any uppercase letters appear in  the  search
  554.           pattern.
  555.  
  556.      -j_n  Specifies a line on the screen where "target" lines are
  557.           to  be positioned.  Target lines are the object of text
  558.           searches, tag searches, jumps to a line  number,  jumps
  559.           to  a  file percentage, and jumps to a marked position.
  560.           The screen line is specified by a number: the top  line
  561.           on  the  screen  is  1,  the next is 2, and so on.  The
  562.           number may be negative to specify a  line  relative  to
  563.           the bottom of the screen: the bottom line on the screen
  564.           is -1, the second to the bottom is -2, and so  on.   If
  565.           the  -j  option  is  used,  searches  begin at the line
  566.           immediately after the target line.  For example, if  "-
  567.           j4"  is used, the target line is the fourth line on the
  568.           screen, so searches begin at  the  fifth  line  on  the
  569.           screen.
  570.  
  571.      -k_f_i_l_e_n_a_m_e
  572.           Causes _l_e_s_s to open and interpret the named file  as  a
  573.           _l_e_s_s_k_e_y  (1)  file.   Multiple -k options may be speci-
  574.           fied.  If a file called .less exists in the user's home
  575.           directory, this file is also used as a _l_e_s_s_k_e_y file.
  576.  
  577.      -m   Causes _l_e_s_s to prompt verbosely (like _m_o_r_e),  with  the
  578.           percent into the file.  By default, _l_e_s_s prompts with a
  579.           colon.
  580.  
  581.      -M   Causes _l_e_s_s to prompt even more verbosely than _m_o_r_e.
  582.  
  583.      -n   Suppresses line numbers.   The  default  (to  use  line
  584.           numbers)  may  cause  _l_e_s_s  to  run more slowly in some
  585.           cases,  especially  with  a  very  large  input   file.
  586.           Suppressing  line  numbers  with the -n flag will avoid
  587.           this problem.   Using  line  numbers  means:  the  line
  588.  
  589.  
  590.  
  591.                                                                 9
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. LESS(1)                  USER COMMANDS                    LESS(1)
  599.  
  600.  
  601.  
  602.           number  will  be displayed in the verbose prompt and in
  603.           the = command, and the v command will pass the  current
  604.           line  number  to the editor (see also the discussion of
  605.           LESSEDIT in PROMPTS below).
  606.  
  607.      -N   Causes a line number to be displayed at  the  beginning
  608.           of each line in the display.
  609.  
  610.      -o_f_i_l_e_n_a_m_e
  611.           Causes _l_e_s_s to copy its input to the named file  as  it
  612.           is being viewed.  This applies only when the input file
  613.           is a pipe, not an ordinary file.  If the  file  already
  614.           exists, _l_e_s_s will ask for confirmation before overwrit-
  615.           ing it.
  616.  
  617.      -O_f_i_l_e_n_a_m_e
  618.           The -O option is like -o,  but  it  will  overwrite  an
  619.           existing file without asking for confirmation.
  620.  
  621.           If no log file  has  been  specified,  the  -o  and  -O
  622.           options  can  be used from within _l_e_s_s to specify a log
  623.           file.  Without a file name, they will simply report the
  624.           name of the log file.  The "s" command is equivalent to
  625.           specifying -o from within _l_e_s_s.
  626.  
  627.      -p_p_a_t_t_e_r_n
  628.           The -p option on the  command  line  is  equivalent  to
  629.           specifying  +/_p_a_t_t_e_r_n;  that is, it tells _l_e_s_s to start
  630.           at the first occurence of _p_a_t_t_e_r_n in the file.
  631.  
  632.      -P_p_r_o_m_p_t
  633.           Provides a way to tailor the  three  prompt  styles  to
  634.           your own preference.  This option would normally be put
  635.           in the LESS environment  variable,  rather  than  being
  636.           typed  in  with each _l_e_s_s command.  Such an option must
  637.           either be the last option in the LESS variable,  or  be
  638.           terminated  by  a dollar sign.  -P followed by a string
  639.           changes the default (short) prompt to that string.  -Pm
  640.           changes  the  medium (-m) prompt to the string, and -PM
  641.           changes the long (-M) prompt.  Also,  -P=  changes  the
  642.           message  printed  by the = command to the given string.
  643.           All prompt strings consist of a sequence of letters and
  644.           special  escape  sequences.  See the section on PROMPTS
  645.           for more details.
  646.  
  647.      -q   Causes moderately "quiet" operation: the terminal  bell
  648.           is  not  rung  if an attempt is made to scroll past the
  649.           end of the file or before the beginning  of  the  file.
  650.           If  the  terminal  has  a  "visual  bell",  it  is used
  651.           instead.  The  bell  will  be  rung  on  certain  other
  652.           errors,  such  as  typing  an  invalid  character.  The
  653.           default is to ring the terminal bell in all such cases.
  654.  
  655.  
  656.  
  657.                                                                10
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. LESS(1)                  USER COMMANDS                    LESS(1)
  665.  
  666.  
  667.  
  668.      -Q   Causes totally "quiet" operation: the terminal bell  is
  669.           never rung.
  670.  
  671.      -r   Causes "raw" control characters to be  displayed.   The
  672.           default  is  to  display  control  characters using the
  673.           caret notation; for example, a control-A (octal 001) is
  674.           displayed  as "^A".  Warning: when the -r flag is used,
  675.           _l_e_s_s cannot keep track of the actual appearance of  the
  676.           screen  (since  this depends on how the screen responds
  677.           to each type  of  control  character).   Thus,  various
  678.           display  problems  may result, such as long lines being
  679.           split in the wrong place.
  680.  
  681.      -s   Causes consecutive blank lines to be  squeezed  into  a
  682.           single  blank  line.  This is useful when viewing _n_r_o_f_f
  683.           output.
  684.  
  685.      -S   Causes lines longer than the screen width to be chopped
  686.           rather  than  folded.  That is, the remainder of a long
  687.           line is simply discarded.  The default is to fold  long
  688.           lines; that is, display the remainder on the next line.
  689.  
  690.      -t_t_a_g
  691.           The -t option, followed immediately by a TAG, will edit
  692.           the  file containing that tag.  For this to work, there
  693.           must be a file called "tags" in the current  directory,
  694.           which  was  previously  built by the _c_t_a_g_s (1) command.
  695.           This option may also  be  specified  from  within  _l_e_s_s
  696.           (using the - command) as a way of examining a new file.
  697.           The command ":t" is equivalent to  specifying  -t  from
  698.           within _l_e_s_s.
  699.  
  700.      -T_t_a_g_s_f_i_l_e
  701.           Specifies a tags file to be used instead of "tags".
  702.  
  703.      -u   Causes backspaces and carriage returns to be treated as
  704.           printable  characters;  that  is,  they are sent to the
  705.           terminal when they appear in the input.
  706.  
  707.      -U   Causes backspaces and carriage returns to be treated as
  708.           control characters; that is, they are handled as speci-
  709.           fied by the -r option.
  710.  
  711.           By default, if neither -u nor -U is  given,  backspaces
  712.           which  appear  adjacent  to an underscore character are
  713.           treated specially: the  underlined  text  is  displayed
  714.           using  the  terminal's hardware underlining capability.
  715.           Also, backspaces which  appear  between  two  identical
  716.           characters  are  treated specially: the overstruck text
  717.           is printed using the terminal's hardware boldface capa-
  718.           bility.   Other  backspaces are deleted, along with the
  719.           preceding  character.   Carriage  returns   immediately
  720.  
  721.  
  722.  
  723.                                                                11
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. LESS(1)                  USER COMMANDS                    LESS(1)
  731.  
  732.  
  733.  
  734.           followed  by  a  newline  are  deleted.  Other carriage
  735.           returns are handled as  specified  by  the  -r  option.
  736.           Text  which is overstruck or underlined can be searched
  737.           for.
  738.  
  739.      -w   Causes blank lines to be used to represent  lines  past
  740.           the  end of the file.  By default, a tilde character is
  741.           used.
  742.  
  743.      -x_n  Sets tab stops every _n positions.  The default for _n is
  744.           8.
  745.  
  746.      -X   Disables sending the termcap initialization and  deini-
  747.           tialization strings to the terminal.  This is sometimes
  748.           desirable if the deinitialization string does something
  749.           unnecessary, like clearing the screen.
  750.  
  751.      -y_n  Specifies a maximum number of lines to scroll  forward.
  752.           If it is necessary to scroll forward more than _n lines,
  753.           the screen is repainted instead.  The -c or  -C  option
  754.           may  be  used  to repaint from the top of the screen if
  755.           desired.   By  default,  any  forward  movement  causes
  756.           scrolling.
  757.  
  758.      -[z]_n
  759.           Changes the default scrolling window size to  _n  lines.
  760.           The default is one screenful.  The z and w commands can
  761.           also be used to change the window size.  The "z" may be
  762.           omitted for compatibility with _m_o_r_e. If the number _n is
  763.           negative, it indicates _n lines less  than  the  current
  764.           screen  size.   For example, if the screen is 24 lines,
  765.           -_z-_4 sets the scrolling window to  20  lines.   If  the
  766.           screen  is  resized  to  40 lines, the scrolling window
  767.           automatically changes to 36 lines.
  768.  
  769.      +    If a command line option begins with +,  the  remainder
  770.           of  that  option  is  taken to be an initial command to
  771.           _l_e_s_s. For example, +G tells _l_e_s_s to start at the end of
  772.           the  file rather than the beginning, and +/xyz tells it
  773.           to start at the first occurrence of "xyz" in the  file.
  774.           As a special case, +<number> acts like +<number>g; that
  775.           is, it starts the display at the specified line  number
  776.           (however,  see the caveat under the "g" command above).
  777.           If the option  starts  with  ++,  the  initial  command
  778.           applies  to every file being viewed, not just the first
  779.           one.  The + command described previously  may  also  be
  780.           used  to  set  (or change) an initial command for every
  781.           file.
  782.  
  783.  
  784. LINE EDITING
  785.      When entering command line at the bottom of the screen  (for
  786.  
  787.  
  788.  
  789.                                                                12
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. LESS(1)                  USER COMMANDS                    LESS(1)
  797.  
  798.  
  799.  
  800.      example, a filename for the :e command, or the pattern for a
  801.      search command), certain keys can be used to manipulate  the
  802.      command  line.   Most  commands  have an alternate form in [
  803.      brackets ] which can be used if a key does not  exist  on  a
  804.      particular keyboard. (The bracketed forms do not work in the
  805.      MS-DOS version.) Any of these special keys  may  be  entered
  806.      literally  by  preceding  it  with a backslash.  A backslash
  807.      itself  may  also  be  entered  literally  by  entering  two
  808.      backslashes.
  809.  
  810.      LEFTARROW [ ESC-h ]
  811.           Move the cursor one space to the left.
  812.  
  813.      RIGHTARROW [ ESC-l ]
  814.           Move the cursor one space to the right.
  815.  
  816.      ^LEFTARROW [ ESC-b or ESC-LEFTARROW ]
  817.           (That is, CONTROL and LEFTARROW  simultaneously.)  Move
  818.           the cursor one word to the left.
  819.  
  820.      ^RIGHTARROW [ ESC-w or ESC-RIGHTARROW ]
  821.           (That is, CONTROL and RIGHTARROW simultaneously.)  Move
  822.           the cursor one word to the right.
  823.  
  824.      HOME [ ESC-0 ]
  825.           Move the cursor to the beginning of the line.
  826.  
  827.      END [ ESC-$ ]
  828.           Move the cursor to the end of the line.
  829.  
  830.      BACKSPACE
  831.           Delete the char to the left of the  cursor,  or  cancel
  832.           the command if the command line is empty.
  833.  
  834.      DELETE or [ ESC-x ]
  835.           Delete the char under the cursor.
  836.  
  837.      ^BACKSPACE [ ESC-BACKSPACE ]
  838.           (That is, CONTROL and BACKSPACE simultaneously.) Delete
  839.           the word to the left of the cursor.
  840.  
  841.      ^DELETE [ ESC-X or ESC-DELETE ]
  842.           (That is, CONTROL and  DELETE  simultaneously.)  Delete
  843.           the word under the cursor.
  844.  
  845.      UPARROW [ ESC-k ]
  846.           Retrieve the previous command line.
  847.  
  848.      DOWNARROW [ ESC-j ]
  849.           Retrieve the next command line.
  850.  
  851.      TAB  Complete the  partial  filename  to  the  left  of  the
  852.  
  853.  
  854.  
  855.                                                                13
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. LESS(1)                  USER COMMANDS                    LESS(1)
  863.  
  864.  
  865.  
  866.           cursor.   If  it  matches  more  than one filename, the
  867.           first match is entered into the command line.  Repeated
  868.           TABs will cycle thru the other matching filesnames.
  869.  
  870.      BACKTAB [ ESC-TAB ]
  871.           Like, TAB, but cycles in the reverse direction thru the
  872.           matching filenames.
  873.  
  874.      ^L   Complete the partial filename to the left of  the  cur-
  875.           sor.  If it matches more than one filename, all matches
  876.           are entered into the command line (if they fit).
  877.  
  878.      ^U (Unix) or ESC (MS-DOS)
  879.           Delete the entire command line, or cancel  the  command
  880.           if the command line is empty.  If you have changed your
  881.           line-kill character in Unix to something other than ^U,
  882.           that character is used instead of ^U.
  883.  
  884.  
  885. KEY BINDINGS
  886.      You may define your own _l_e_s_s commands by using  the  program
  887.      _l_e_s_s_k_e_y  (1)  to  create  a file called ".less" in your home
  888.      directory.  This file specifies a set of command keys and an
  889.      action  associated  with  each  key.  See the _l_e_s_s_k_e_y manual
  890.      page for more details.
  891.  
  892.  
  893. INPUT PREPROCESSOR
  894.      You may define an "input preprocessor" for _l_e_s_s. Before _l_e_s_s
  895.      opens  a  file,  it  first  gives  your input preprocessor a
  896.      chance to modify the  way  the  contents  of  the  file  are
  897.      displayed.   An  input  preprocessor is simply an executable
  898.      program (or shell script), which writes the contents of  the
  899.      file  to a different file, called the replacement file.  The
  900.      contents of the replacement file are then displayed in place
  901.      of  the  contents  of  the  original file.  However, it will
  902.      appear to the user as if the original file is  opened;  that
  903.      is,  _l_e_s_s  will display the original filename as the name of
  904.      the current file.
  905.  
  906.      An input preprocessor receives one  command  line  argument,
  907.      the  original  filename,  as entered by the user.  It should
  908.      create the replacement file, and when  finished,  print  the
  909.      name of the replacement file to its standard output.  If the
  910.      input preprocessor does not output a  replacement  filename,
  911.      _l_e_s_s  uses the original file, as normal.  To set up an input
  912.      preprocessor, set the LESSOPEN  environment  variable  to  a
  913.      command  line  which  will  invoke  your input preprocessor.
  914.      This command line should include one occurence of the string
  915.      "%s",  which will be replaced by the filename when the input
  916.      preprocessor command is invoked.
  917.  
  918.  
  919.  
  920.  
  921.                                                                14
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. LESS(1)                  USER COMMANDS                    LESS(1)
  929.  
  930.  
  931.  
  932.      When _l_e_s_s closes a file opened in such a way, it  will  call
  933.      another  program,  called the input postprocessor, which may
  934.      perform any desired clean-up action (such  as  deleting  the
  935.      replacement   file   created  by  LESSOPEN).   This  program
  936.      receives two command line arguments, the  original  filename
  937.      as  entered  by  the  user,  and the name of the replacement
  938.      file.  To set up an input postprocessor, set  the  LESSCLOSE
  939.      environment  variable  to  a  command line which will invoke
  940.      your input postprocessor.  It may include two occurences  of
  941.      the  string  "%s";  the  first is replaced with the original
  942.      name of the file  and  the  second  with  the  name  of  the
  943.      replacement file, which was output by LESSOPEN.
  944.  
  945.      For example, on many Unix systems, these  two  scripts  will
  946.      allow  you to keep files in compressed format, but still let
  947.      _l_e_s_s view them directly (by giving _l_e_s_s the name of the file
  948.      without the .Z suffix):
  949.  
  950.      lessopen.sh:
  951.           #! /bin/sh
  952.           if [ -f "$1.Z" ]; then
  953.                uncompress -c $1.Z >$1.tmp
  954.                echo $1.tmp
  955.           fi
  956.  
  957.      lessclose.sh:
  958.           #! /bin/sh
  959.           rm $2
  960.  
  961.      To use these scripts, put them both where they can  be  exe-
  962.      cuted     and     set     LESSOPEN="lessopen.sh %s",     and
  963.      LESSCLOSE="lessclose.sh %s %s".  More complex  LESSOPEN  and
  964.      LESSCLOSE scripts may be written to also accept the filename
  965.      either with or without the .Z suffix,  or  to  accept  other
  966.      types of compressed files, and so on.
  967.  
  968.  
  969. NATIONAL CHARACTER SETS
  970.      There are three types of characters in the input file:
  971.  
  972.      normal characters
  973.           can be displayed directly to the screen.
  974.  
  975.      control characters
  976.           should not be displayed directly, but are  expected  to
  977.           be  found in ordinary text files (such as backspace and
  978.           tab).
  979.  
  980.      binary characters
  981.           should not be displayed directly and are  not  expected
  982.           to be found in text files.
  983.  
  984.  
  985.  
  986.  
  987.                                                                15
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. LESS(1)                  USER COMMANDS                    LESS(1)
  995.  
  996.  
  997.  
  998.      A "character set" is simply a description of  which  charac-
  999.      ters  are to be considered normal, control, and binary.  The
  1000.      LESSCHARSET environment variable may be  used  to  select  a
  1001.      character set.  Possible values for LESSCHARSET are:
  1002.  
  1003.      ascii
  1004.           The default  character  set.   BS,  TAB,  NL,  CR,  and
  1005.           formfeed  are control characters, all chars with values
  1006.           between 127 and 255 are binary, and all others are nor-
  1007.           mal.
  1008.  
  1009.      latin1
  1010.           Selects the ISO 8859/1 character set.  latin-1  is  the
  1011.           same  as  ASCII,  except characters between 161 and 255
  1012.           are treated as normal characters.
  1013.  
  1014.      dos  Selects a character set appropriate for MS-DOS.
  1015.  
  1016.      In special cases, it may be desired to tailor _l_e_s_s to use  a
  1017.      character  set other than the ones definable by LESSCHARSET.
  1018.      In this case, the environment variable  LESSCHARDEF  can  be
  1019.      used  to  define  a  character  set.   It should be set to a
  1020.      string where each character in  the  string  represents  one
  1021.      character  in  the character set.  The character "." is used
  1022.      for a normal character, "c" for control, and "b" for binary.
  1023.      A  decimal  number may be used for repetition.  For example,
  1024.      "bccc4b." would mean character 0 is binary, 1, 2 and  3  are
  1025.      control,  4,  5,  6  and 7 are binary, and 8 is normal.  All
  1026.      characters after the last are taken to be the  same  as  the
  1027.      last, so characters 9 through 255 would be normal.  (This is
  1028.      an example, and does  not  necessarily  represent  any  real
  1029.      character set.)
  1030.  
  1031.      Setting LESSCHARDEF to "8bcccbcc18b95.b" is the same as set-
  1032.      ting   LESSCHARSET   to  "ascii".   Setting  LESSCHARDEF  to
  1033.      "8bcccbcc18b95.33b." is the same as setting  LESSCHARSET  to
  1034.      "latin1".
  1035.  
  1036.      If neither LESSCHARSET nor LESSCHARDEF is set, but your sys-
  1037.      tem  supports  the _s_e_t_l_o_c_a_l_e interface, _l_e_s_s will use setlo-
  1038.      cale to determine the  character  set.   setlocale  is  con-
  1039.      trolled  by  setting  the LANG or LC_CTYPE environment vari-
  1040.      ables.
  1041.  
  1042.      Control and binary  characters  are  displayed  in  standout
  1043.      (reverse  video).  Each such character is displayed in caret
  1044.      notation if possible (e.g. ^A for control-A).   Caret  nota-
  1045.      tion  is  used  only  if inverting the 0100 bit results in a
  1046.      normal printable character.   Otherwise,  the  character  is
  1047.      displayed  as  a  hex number in angle brackets.  This format
  1048.      can be changed by setting the LESSBINFMT  environment  vari-
  1049.      able.   LESSBINFMT may begin with a "*" and one character to
  1050.  
  1051.  
  1052.  
  1053.                                                                16
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. LESS(1)                  USER COMMANDS                    LESS(1)
  1061.  
  1062.  
  1063.  
  1064.      select the display attribute:  "*k"  is  blinking,  "*d"  is
  1065.      bold,  "*u"  is underlined, "*s" is standout.  If LESSBINFMT
  1066.      does not begin with a "*", normal attribute is assumed.  The
  1067.      remainder  of  LESSBINFMT  is a string which may include one
  1068.      printf-style escape sequence (a % followed by x,  X,  o,  d,
  1069.      etc.).  For example, if LESSBINFMT is "*u[%x]", binary char-
  1070.      acters are displayed in underlined hexadecimal surrounded by
  1071.      brackets.   The  default  if  no  LESSBINFMT is specified is
  1072.      "*d<%X>".
  1073.  
  1074.  
  1075. PROMPTS
  1076.      The -P option allows  you  to  tailor  the  prompt  to  your
  1077.      preference.   The string given to the -P option replaces the
  1078.      specified prompt string.  Certain characters in  the  string
  1079.      are  interpreted  specially.  The prompt mechanism is rather
  1080.      complicated to provide flexibility, but  the  ordinary  user
  1081.      need not understand the details of constructing personalized
  1082.      prompt strings.
  1083.  
  1084.      A percent sign followed by a single  character  is  expanded
  1085.      according to what the following character is:
  1086.  
  1087.      %b_X  Replaced by the byte  offset  into  the  current  input
  1088.           file.   The  b is followed by a single character (shown
  1089.           as _X above) which specifies the line whose byte  offset
  1090.           is  to  be  used.   If the character is a "t", the byte
  1091.           offset of the top line in the display is used,  an  "m"
  1092.           means  use  the middle line, a "b" means use the bottom
  1093.           line, a "B" means use the line just  after  the  bottom
  1094.           line,  and a "j" means use the "target" line, as speci-
  1095.           fied by the -j option.
  1096.  
  1097.      %B   Replaced by the size of the current input file.
  1098.  
  1099.      %E   Replaced by the name of the  editor  (from  the  EDITOR
  1100.           environment  variable).   See  the  discussion  of  the
  1101.           LESSEDIT feature below.
  1102.  
  1103.      %f   Replaced by the name of the current input file.
  1104.  
  1105.      %i   Replaced by the index of the current file in  the  list
  1106.           of input files.
  1107.  
  1108.      %l_X  Replaced by the line number of  a  line  in  the  input
  1109.           file.   The  line to be used is determined by the _X, as
  1110.           with the %b option.
  1111.  
  1112.      %L   Replaced by the line number of the  last  line  in  the
  1113.           input file.
  1114.  
  1115.      %m   Replaced by the total number of input files.
  1116.  
  1117.  
  1118.  
  1119.                                                                17
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. LESS(1)                  USER COMMANDS                    LESS(1)
  1127.  
  1128.  
  1129.  
  1130.      %p_X  Replaced by the percent into the  current  input  file.
  1131.           The  line  used  is  determined by the _X as with the %b
  1132.           option.
  1133.  
  1134.      %s   Same as %B.
  1135.  
  1136.      %t   Causes any trailing spaces to be removed.  Usually used
  1137.           at the end of the string, but may appear anywhere.
  1138.  
  1139.      %x   Replaced by the name of the  next  input  file  in  the
  1140.           list.
  1141.  
  1142.      If any item is unknown (for example, the file size if  input
  1143.      is a pipe), a question mark is printed instead.
  1144.  
  1145.      The format of the prompt string can be changed depending  on
  1146.      certain  conditions.   A  question mark followed by a single
  1147.      character acts like an  "IF":  depending  on  the  following
  1148.      character,  a  condition  is evaluated.  If the condition is
  1149.      true, any characters following the question mark and  condi-
  1150.      tion  character, up to a period, are included in the prompt.
  1151.      If the condition is false, such characters are not included.
  1152.      A  colon  appearing between the question mark and the period
  1153.      can be used to establish an "ELSE": any  characters  between
  1154.      the  colon  and the period are included in the string if and
  1155.      only if the IF condition  is  false.   Condition  characters
  1156.      (which follow a question mark) may be:
  1157.  
  1158.      ?a   True if any characters have been included in the prompt
  1159.           so far.
  1160.  
  1161.      ?b_X  True if the byte offset of the specified line is known.
  1162.  
  1163.      ?B   True if the size of current input file is known.
  1164.  
  1165.      ?e   True if at end-of-file.
  1166.  
  1167.      ?f   True if there is an input filename (that is,  if  input
  1168.           is not a pipe).
  1169.  
  1170.      ?l_X  True if the line number of the specified line is known.
  1171.  
  1172.      ?L   True if the line number of the last line in the file is
  1173.           known.
  1174.  
  1175.      ?m   True if there is more than one input file.
  1176.  
  1177.      ?n   True if this is the first prompt in a new input file.
  1178.  
  1179.      ?p_X  True if the percent into the current input file of  the
  1180.           specified line is known.
  1181.  
  1182.  
  1183.  
  1184.  
  1185.                                                                18
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. LESS(1)                  USER COMMANDS                    LESS(1)
  1193.  
  1194.  
  1195.  
  1196.      ?s   Same as "?B".
  1197.  
  1198.      ?x   True if there is a next input file  (that  is,  if  the
  1199.           current input file is not the last one).
  1200.  
  1201.      Any characters other than the special ones  (question  mark,
  1202.      colon, period, percent, and backslash) become literally part
  1203.      of the  prompt.   Any  of  the  special  characters  may  be
  1204.      included  in  the  prompt  literally  by preceding it with a
  1205.      backslash.
  1206.  
  1207.      Some examples:
  1208.  
  1209.      ?f%f:Standard input.
  1210.  
  1211.      This prompt prints the filename,  if  known;  otherwise  the
  1212.      string "Standard input".
  1213.  
  1214.      ?f%f .?ltLine %lt:?pt%pt\%:?btByte %bt:-...
  1215.  
  1216.      This  prompt  would  print  the  filename,  if  known.   The
  1217.      filename is followed by the line number, if known, otherwise
  1218.      the percent if known, otherwise the byte  offset  if  known.
  1219.      Otherwise, a dash is printed.  Notice how each question mark
  1220.      has a matching period, and  how  the  %  after  the  %pt  is
  1221.      included literally by escaping it with a backslash.
  1222.  
  1223.      ?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x..%t
  1224.  
  1225.      This prints the filename if this is the first  prompt  in  a
  1226.      file, followed by the "file N of N" message if there is more
  1227.      than one input file.  Then, if we are  at  end-of-file,  the
  1228.      string  "(END)"  is printed followed by the name of the next
  1229.      file, if there is one.  Finally,  any  trailing  spaces  are
  1230.      truncated.  This is the default prompt.  For reference, here
  1231.      are the defaults for  the  other  two  prompts  (-m  and  -M
  1232.      respectively).   Each is broken into two lines here for rea-
  1233.      dability only.
  1234.  
  1235.      ?n?f%f .?m(file %i of %m) ..?e(END) ?x- Next\: %x.:
  1236.           ?pB%pB\%:byte %bB?s/%s...%t
  1237.  
  1238.      ?f%f .?n?m(file %i of %m) ..?ltline %lt?L/%L. :byte %bB?s/%s. .
  1239.           ?e(END) ?x- Next\: %x.:?pB%pB\%..%t
  1240.  
  1241.      And here is the default message produced by the = command:
  1242.  
  1243.      ?f%f .?m(file %i of %m) .?ltline %lt?L/%L. .
  1244.           byte %bB?s/%s. ?e(END) :?pB%pB\%..%t
  1245.  
  1246.      The prompt expansion features are also used for another pur-
  1247.      pose:  if an environment variable LESSEDIT is defined, it is
  1248.  
  1249.  
  1250.  
  1251.                                                                19
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. LESS(1)                  USER COMMANDS                    LESS(1)
  1259.  
  1260.  
  1261.  
  1262.      used as the command to be executed when  the  v  command  is
  1263.      invoked.  The LESSEDIT string is expanded in the same way as
  1264.      the prompt strings.  The default value for LESSEDIT is:
  1265.  
  1266.           %E ?lm+%lm. %f
  1267.  
  1268.      Note that this expands to the editor name, followed by  a  +
  1269.      and  the  line  number,  followed by the file name.  If your
  1270.      editor does not accept  the  "+linenumber"  syntax,  or  has
  1271.      other  differences  in invocation syntax, the LESSEDIT vari-
  1272.      able can be changed to modify this default.
  1273.  
  1274.  
  1275. ENVIRONMENT VARIABLES
  1276.      COLUMNS
  1277.           Sets the number of columns on the screen.   Takes  pre-
  1278.           cedence  over  the  number  of columns specified by the
  1279.           TERM variable.  (But if you  have  a  windowing  system
  1280.           which  supports  TIOCGWINSZ  or  WIOCGETD,  the  window
  1281.           system's idea of the screen size takes precedence  over
  1282.           the LINES and COLUMNS environment variables.)
  1283.  
  1284.      EDITOR
  1285.           The name of the editor (used for the v command).
  1286.  
  1287.      HOME Name of the user's home directory (used to find a .less
  1288.           file).
  1289.  
  1290.      LANG Language for determining the character set.
  1291.  
  1292.      LC_CTYPE
  1293.           Language for determining the character set.
  1294.  
  1295.      LESS Flags which are passed to _l_e_s_s automatically.
  1296.  
  1297.      LESSBINFMT
  1298.           Format for displaying non-printable, non-control  char-
  1299.           acters.
  1300.  
  1301.      LESSCHARDEF
  1302.           Defines a character set.
  1303.  
  1304.      LESSCHARSET
  1305.           Selects a predefined character set.
  1306.  
  1307.      LESSCLOSE
  1308.           Command  line   to   invoke   the   (optional)   input-
  1309.           postprocessor.
  1310.  
  1311.      LESSEDIT
  1312.           Editor prototype string (used for the v command).   See
  1313.           discussion under PROMPTS.
  1314.  
  1315.  
  1316.  
  1317.                                                                20
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. LESS(1)                  USER COMMANDS                    LESS(1)
  1325.  
  1326.  
  1327.  
  1328.      LESSHELP
  1329.           Name of the help file.
  1330.  
  1331.      LESSOPEN
  1332.           Command  line   to   invoke   the   (optional)   input-
  1333.           preprocessor.
  1334.  
  1335.      LINES
  1336.           Sets the number of lines on  the  screen.   Takes  pre-
  1337.           cedence  over the number of lines specified by the TERM
  1338.           variable.
  1339.  
  1340.      SHELL
  1341.           The shell used to execute the ! command, as well as  to
  1342.           expand filenames.
  1343.  
  1344.      TERM The type of terminal on which _l_e_s_s is being run.
  1345.  
  1346.  
  1347. SEE ALSO
  1348.      lesskey(1)
  1349.  
  1350.  
  1351. WARNINGS
  1352.      The = command and prompts (unless changed by -P) report  the
  1353.      line  number  of  the line at the top of the screen, but the
  1354.      byte and percent of the line at the bottom of the screen.
  1355.  
  1356.      If the :e command is used to name more than  one  file,  and
  1357.      one  of  the named files has been viewed previously, the new
  1358.      files may be entered into the list in an unexpected order.
  1359.  
  1360.      There is no way (yet) to modify key bindings  for  the  line
  1361.      editing commands.
  1362.  
  1363.      If a line longer than the screen width  is  split  (folded),
  1364.      and  a  search  matches  text which straddles the split, the
  1365.      matching text will not  be  highlighted  (although  it  will
  1366.      still be found by the search).
  1367.  
  1368.      If a search is done using the ! operator for text NOT match-
  1369.      ing  a  pattern,  the strings which do match the pattern are
  1370.      highlighted.
  1371.  
  1372.  
  1373. COPYRIGHT
  1374.      Copyright (c) 1984,1985,1989,1994  Mark Nudelman
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.                                                                21
  1384.  
  1385.  
  1386.  
  1387.