home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / text / less-1.6z.lha / Less / Less.doc < prev    next >
Text File  |  1993-10-08  |  22KB  |  522 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. _l_e_s_s - _o_p_p_o_s_i_t_e _o_f _m_o_r_e
  8.  
  9. Version 1.6Z July 18, 1993
  10.  
  11. Versions since Amiga version 1.3Z are supported by
  12.  
  13. Raymond L. Zarling,
  14. Department of Computer Science
  15. Calif. State Univ. Stanislaus
  16. Turlock, CA 95380
  17.  
  18. rayz@csustan.EDU
  19.  
  20.  
  21. _l_e_s_s [-_d_s_t_w_c_C_e_E_m_M_q_Q_u_U] [-_h_N] [-b[fp]_N] [-x_N] [-[z]_N]
  22.      [-_P[_m_M]_s_t_r_i_n_g] [+_c_m_d]  [_f_i_l_e_n_a_m_e]...
  23.  
  24. _L_e_s_s is a program similar to  _m_o_r_e  (1),  but  which  allows
  25. backwards  movement in the file as well as forward movement.
  26. Also, _l_e_s_s does not have  to  read  the  entire  input  file
  27. before starting, so with large input files it starts up fas-
  28. ter than most text editors.
  29.  
  30.      Commands are based on _m_o_r_e,  _v_i and _e_m_a_c_s.   Commands  may
  31. be  preceeded  by a decimal number, called N in the descrip-
  32. tions below.  The number is used by some commands, as  indi-
  33. cated.
  34.  
  35.  
  36. _I_n _t_h_e _f_o_l_l_o_w_i_n_g _d_e_s_c_r_i_p_t_i_o_n_s, ^_X _m_e_a_n_s _c_o_n_t_r_o_l-_X.
  37.  
  38. H or Help key
  39.      Help: display a summary of these commands.  If you for-
  40.      get all the other commands, remember this one.
  41.  
  42.  
  43. SPACE
  44.      Scroll forward N lines, default one window (see  option
  45.      -z below).  If N is more than the screen size, only the
  46.      final screenful is displayed.
  47.  
  48.  
  49. f or ^F
  50.      Same as SPACE.
  51.  
  52.  
  53. ^V
  54.      Same as SPACE.
  55.  
  56.  
  57. b or ^B
  58.      Scroll backward N lines, default one window (see option
  59.      -z below).  If N is more than the screen size, only the
  60.      final screenful is displayed.
  61.  
  62.  
  63. RETURN
  64.      Scroll forward N lines, default 1.  The entire N lines
  65.      are displayed, even if N is more than the screen size.
  66.  
  67.  
  68. e or ^E
  69.      Same as RETURN.
  70.  
  71. ^N
  72.      Same as RETURN.
  73.  
  74.  
  75. j or ^J
  76.      Also the same as RETURN.
  77.  
  78. y or ^Y
  79.      Scroll backward N lines, default 1.  The entire N lines
  80.      are displayed, even if N is more than the screen size.
  81.  
  82. k or ^K
  83.      Same as y.
  84.  
  85. ^P
  86.      Same as y.
  87.  
  88.  
  89. d or ^D
  90.      Scroll forward N lines, default half of the screen.  If
  91.      N is specified, it becomes the new default for subsequent
  92.      d and u commands.  The half-screen default is set again
  93.      whenever the screen is resized.
  94.  
  95.  
  96. u or ^U
  97.      Scroll backward N lines, default half of the screen.  If
  98.      N is specified, it becomes the new default for subsequent
  99.      d and u commands.  The half-screen default is set again
  100.      whenever the screen is resized.
  101.  
  102.  
  103. r or ^R or ^L
  104.      Repaint the screen.
  105.  
  106.  
  107. R    Repaint the  screen,  discarding  any  buffered  input.
  108.      Useful  if  the  file  is  changing  while  it is being
  109.      viewed.
  110.  
  111.  
  112. g    Go to line N in  the  file,  default  1  (beginning  of
  113.      file).  (Warning: this may be slow if N is large.)
  114.  
  115. <    Same as g.
  116.  
  117.  
  118. G    Go to line N in the file, default the end of the  file.
  119.      (Warning:  this  may  be slow if standard input, rather
  120.      than a file, is being read.)
  121.  
  122. >    Same as G.
  123.  
  124.  
  125. p    Go to a position N percent into the file.  N should  be
  126.      between 0 and 100.  (This is possible if standard input
  127.      is being read, but only if _l_e_s_s has already read to the
  128.      end  of  the  file.   It is always fast, but not always
  129.      useful.)
  130.  
  131.  
  132. %    Same as p.
  133.  
  134.  
  135. m    Followed by any lowercase  letter,  marks  the  current
  136.      position with that letter.
  137.  
  138.  
  139. '    (Single  quote.)  Followed  by  any  lowercase  letter,
  140.      returns  to  the  position  which was previously marked
  141.      with that letter.  Followed by  another  single  quote,
  142.      returns  to the postion at which the last "large" move-
  143.      ment command was executed.  All marks are lost  when  a
  144.      new file is examined.
  145.  
  146.  
  147. /pattern
  148.      Search forward in the file for the N-th line containing
  149.      the  pattern.  N defaults to 1.  The pattern is a regu-
  150.      lar expression, as recognized by Unix _e_d (see the
  151.      section on regular expressions below).  The search starts
  152.      at  the  second  line displayed (but see the -t option,
  153.      which changes this).  If the pattern is omitted, search
  154.      for another occurance of the most recent pattern.
  155.  
  156. ^S   Same as /.
  157.  
  158.  
  159. ?pattern
  160.      Search backward in the file for the N-th line  contain-
  161.      ing the pattern.  The search starts at the line immedi-
  162.      ately before the top line displayed.  If the pattern is
  163.      omitted, search for another occurance of the most recent
  164.      pattern.
  165.  
  166.  
  167. n    Repeat previous search, for N-th  line  containing  the
  168.      last pattern, searching in the same direction as the
  169.      previous search.
  170.  
  171.  
  172. E    Examine a new file.  If the filename  is  missing,  the
  173.      "current"  file  (see  the N and P commands below) from
  174.      the list of files in the command line  is  re-examined.
  175.      If  the  filename  is  a pound sign (#), the previously
  176.      examined file is re-examined (one level of backup only).
  177.  
  178.  
  179. N    Examine the next file (from the list of files given  in
  180.      the  command line).  If a number N is specified (not to
  181.      be confused with the command N), the N-th next file  is
  182.      examined.
  183.  
  184.  
  185. P    Examine the previous file.  If a number N is specified,
  186.      the N-th previous file is examined.
  187.  
  188.  
  189. = or ^G
  190.      Prints some information about the  file  being  viewed,
  191.      including  its  name  and the byte offset of the bottom
  192.      line being displayed.  If possible, it also prints  the
  193.      length  of  the  file and the percent of the file above
  194.      the last displayed line.
  195.  
  196.  
  197. -    Followed by one of the command line option letters (see
  198.      below), this will toggle the setting of that option
  199.      and/or print a message describing the new setting.  Not
  200.      all options can be set from within the program:  b, P,
  201.      and window sizing are command-line only options.
  202.  
  203. +cmd Causes the specified cmd to be executed each time a new
  204.      file  is examined.  For example, +G causes _l_e_s_s to ini-
  205.      tially display each file starting  at  the  end  rather
  206.      than the beginning.
  207.  
  208.  
  209. V    Prints the version number of _l_e_s_s being run.
  210.  
  211.  
  212. q    Exits _l_e_s_s.
  213.  
  214.  
  215. _C_o_m_m_a_n_d _l_i_n_e _o_p_t_i_o_n_s _a_r_e _d_e_s_c_r_i_b_e_d _b_e_l_o_w.  _M_o_s_t _o_p_t_i_o_n_s  _m_a_y
  216. _b_e _c_h_a_n_g_e_d _w_h_i_l_e _l_e_s_s is running, via the "-" command.
  217.  
  218.      Options are also taken from  the  environment  variable
  219. "LESS".   For  example, if you like very verbose prompting, to
  220. avoid typing "less -M ..." each time _l_e_s_s  is  invoked,  you
  221. might tell _c_s_h or the AmigaDOS shell:
  222.  
  223. setenv LESS M
  224.  
  225. or if you use _S_K_s_h:
  226.  
  227. LESS=M; export LESS
  228.  
  229. The environment variable is parsed before the command  line,
  230. so  command line options override the LESS environment vari-
  231. able.  A dollar sign ($) may be used to signal the end of an
  232. option  string.   This is important only for options like -P
  233. which take a following string.
  234.  
  235. Some options have values, some are 2-way toggles, and some are
  236. 3-way toggles.  The 3-way ones are handled by using both an
  237. upper-case and a lower-case option name.  Usually, the upper-
  238. case option is the most extreme, the lower-case setting is
  239. moderate, and neither is least extreme.  For instance, the
  240. -m and -M options control the length of the prompt line.  If
  241. -M is in effect, you get a relatively long prompt, while -m
  242. is much shorter.  If neither -m nor -M is set, the prompt is
  243. a single ":" character (unless you redefine one or more of
  244. these using -P).  To change a 3-way option, use either -x or
  245. -X, where x is the option name.  Typing -x will establish the
  246. moderate case if it wasn't already set (i.e. either -X or
  247. neither was in effect) or set the least extreme ("neither")
  248. choice if it was.  Similarly, -X would establish the X option
  249. if it wasn't already in effect; otherwise "neither".
  250.  
  251. -b   Numeric; set from command line or environment only.
  252.      The -b_n option tells _l_e_s_s to use a non-standard  buffer
  253.      size.   There  are two standard (default) buffer sizes,
  254.      one is used when a file is being  read  and  the  other
  255.      when  a  pipe  (standard  input)  is  being  read.  The
  256.      current defaults are 5 buffers for  files  and  12  for
  257.      pipes.   (Buffers  are 1024 bytes.) The number _