home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / txtutl / tcless.arc / TCLESS.DOC < prev    next >
Text File  |  1988-04-22  |  15KB  |  397 lines

  1.  
  2.  
  3.  
  4.      LLLLEEEESSSSSSSS(((())))                       MMMMSSSS----DDDDOOOOSSSS                        LLLLEEEESSSSSSSS(((())))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           less - opposite of more
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           lllleeeessssssss [[[[----ccccCCCCeeeeppppttttmmmmMMMMqqqqQQQQuuuuUUUU]]]] [[[[----hhhh_N]]]] [[[[----bbbb[[[[ffffpppp]]]]_N]]]]
  13.                [[[[++++_c_m_d]]]]  [[[[_f_i_l_e_n_a_m_e]]]]............
  14.  
  15.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.           _L_e_s_s is a program similar to _m_o_r_e (1), but which allows
  17.           backwards movement in the file as well as forward movement.
  18.           Also, _l_e_s_s does not have to read the entire input file
  19.           before starting, so with large input files it starts up
  20.           faster than text editors like _v_i (1).
  21.  
  22.           Commands are based on both _m_o_r_e and _v_i. Commands may be
  23.           preceeded by a decimal number, called N in the descriptions
  24.           below.  The number is used by some commands, as indicated.
  25.  
  26.  
  27.      CCCCOOOOMMMMMMMMAAAANNNNDDDDSSSS
  28.           In the following descriptions, ^X means control-X.
  29.  
  30.           h    Help: display a summary of these commands.  If you
  31.                forget all the other commands, remember this one.
  32.  
  33.           SPACE
  34.                Scroll forward N lines, default one window (see option
  35.                -z below).  If N is more than the screen size, only the
  36.                final screenful is displayed.
  37.  
  38.           f or ^F
  39.                Same as SPACE.
  40.  
  41.           b or ^B
  42.                Scroll backward 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.
  45.  
  46.           RETURN
  47.                Scroll forward N lines, default 1.  The entire N lines
  48.                are displayed, even if N is more than the screen size.
  49.  
  50.           e or ^E
  51.                Same as RETURN.
  52.  
  53.           j or ^J
  54.                Also the same as RETURN.
  55.  
  56.           y or ^Y
  57.                Scroll backward N lines, default 1.  The entire N lines
  58.                are displayed, even if N is more than the screen size.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/22/88)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      LLLLEEEESSSSSSSS(((())))                       MMMMSSSS----DDDDOOOOSSSS                        LLLLEEEESSSSSSSS(((())))
  71.  
  72.  
  73.  
  74.           k or ^K
  75.                Same as y.
  76.  
  77.           d or ^D
  78.                Scroll forward N lines, default 10.  If N is specified,
  79.                it becomes the new default for subsequent d and u
  80.                commands.
  81.  
  82.           u or ^U
  83.                Scroll backward N lines, default 10.  If N is
  84.                specified, it becomes the new default for subsequent d
  85.                and u commands.
  86.  
  87.           r or ^R or ^L
  88.                Repaint the screen.
  89.  
  90.           R    Repaint the screen, discarding any buffered input.
  91.                Useful if the file is changing while it is being
  92.                viewed.
  93.  
  94.           g    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    Go to line N in the file, default the end of the file.
  98.                (Warning: this may be slow if standard input, rather
  99.                than a file, is being read.)
  100.  
  101.           p    Go to a position N percent into the file.  N should be
  102.                between 0 and 100.  (This is possible if standard input
  103.                is being read, but only if _l_e_s_s has already read to the
  104.                end of the file.  It is always fast, but not always
  105.                useful.)
  106.  
  107.           %    Same as p.
  108.  
  109.           m    Followed by any lowercase letter, marks the current
  110.                position with that letter.
  111.  
  112.           '    (Single quote.)  Followed by any lowercase letter,
  113.                returns to the position which was previously marked
  114.                with that letter.  Followed by another single quote,
  115.                returns to the postion at which the last "large"
  116.                movement command was executed.  All marks are lost when
  117.                a new file is examined.
  118.  
  119.           /pattern
  120.                Search forward in the file for the N-th line containing
  121.                the pattern.  N defaults to 1.  The pattern is a
  122.                regular expression, as recognized by _e_d, and, in this
  123.                implementation, may include the additional
  124.                metacharacters unique to _e_g_r_e_p. The search starts at
  125.                the second line displayed (but see the -t option, which
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/22/88)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      LLLLEEEESSSSSSSS(((())))                       MMMMSSSS----DDDDOOOOSSSS                        LLLLEEEESSSSSSSS(((())))
  137.  
  138.  
  139.  
  140.                changes this).
  141.  
  142.           ?pattern
  143.                Search backward in the file for the N-th line
  144.                containing the pattern.  The search starts at the line
  145.                immediately before the top line displayed.
  146.  
  147.           n    Repeat previous search, for N-th line containing the
  148.                last pattern.
  149.  
  150.           E    Examine a new file.  If the filename is missing, the
  151.                "current" file (see the N and P commands below) from
  152.                the list of files in the command line is re-examined.
  153.  
  154.           N    Examine the next file (from the list of files given in
  155.                the command line).  If a number N is specified (not to
  156.                be confused with the command N), the N-th next file is
  157.                examined.
  158.  
  159.           P    Examine the previous file.  If a number N is specified,
  160.                the N-th previous file is examined.
  161.  
  162.           = or ^G
  163.                Displays some information about the file being viewed,
  164.                including its name and the byte offset of the bottom
  165.                line being displayed.  If possible, it also prints the
  166.                length of the file and the percent of the file above
  167.                the last displayed line.
  168.  
  169.           L    Displays the number of the line appearing at the top of
  170.                the screen, in addition to the information displayed
  171.                with the = or ^G command (file name, byte offset,
  172.                length and approximate percentage). _N_o_t_e: this command
  173.                can be slow, particularly on long files.
  174.  
  175.           -    Followed by one of the command line option letters (see
  176.                below), this will toggle the setting of that option and
  177.                print a message describing the new setting.
  178.  
  179.           +cmd Causes the specified cmd to be executed each time a new
  180.                file is examined.  For example, +G causes _l_e_s_s to
  181.                initially display each file starting at the end rather
  182.                than the beginning.
  183.  
  184.           V    Prints the version number of _l_e_s_s being run.
  185.  
  186.           q    Exits _l_e_s_s.
  187.  
  188.           The following two commands are valid in the DOS version of
  189.           _l_e_s_s.
  190.  
  191.           v    Invokes an editor to edit the current file being
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/22/88)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      LLLLEEEESSSSSSSS(((())))                       MMMMSSSS----DDDDOOOOSSSS                        LLLLEEEESSSSSSSS(((())))
  203.  
  204.  
  205.  
  206.                viewed.  The editor is taken from the environment
  207.                variable EDITOR, or defaults to "emacs".
  208.  
  209.           ! shell-command
  210.                Invokes a shell to run the shell-command given.
  211.  
  212.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  213.           Command line options are described below.  Most options may
  214.           be changed while _l_e_s_s is running, via the "-" command.
  215.  
  216.           Options are also taken from the environment variable "LESS".
  217.           For example, if you like more-style prompting, to avoid
  218.           typing "less -m ..." each time _l_e_s_s is invoked, you might
  219.           tell DOS:
  220.  
  221.                                    set LESS=m
  222.  
  223.           The environment variable is parsed before the command line,
  224.           so command line options override the LESS environment
  225.           variable.
  226.  
  227.           -t   Normally, forward searches start just after the top
  228.                displayed line (that is, at the second displayed line).
  229.                Thus forward searches include the currently displayed
  230.                screen.  The -t option causes forward searches to start
  231.                just after the bottom line displayed, thus skipping the
  232.                currently displayed screen.
  233.  
  234.           -m   Normally, _l_e_s_s prompts with a colon.  The -m option
  235.                causes _l_e_s_s to prompt verbosely (like _m_o_r_e), with the
  236.                percent into the file.
  237.  
  238.           -M   The -M option causes _l_e_s_s to prompt even more verbosely
  239.                than _m_o_r_e.
  240.  
  241.           -q   Normally, if an attempt is made to scroll past the end
  242.                of the file or before the beginning of the file, the
  243.                terminal bell is rung to indicate this fact.  The -q
  244.                option tells _l_e_s_s not to ring the bell at such times.
  245.                If the terminal has a "visual bell", it is used
  246.                instead.
  247.  
  248.           -Q   Even if -q is given, _l_e_s_s will ring the bell on certain
  249.                other errors, such as typing an invalid character.  The
  250.                -Q option tells _l_e_s_s to be quiet all the time; that is,
  251.                never ring the terminal bell.  If the terminal has a
  252.                "visual bell", it is used instead.
  253.  
  254.           -e   Normally the only way to exit less is via the "q"
  255.                command.  The -e option tells less to automatically
  256.                exit the second time it reaches end-of-file.
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 4/22/88)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      LLLLEEEESSSSSSSS(((())))                       MMMMSSSS----DDDDOOOOSSSS                        LLLLEEEESSSSSSSS(((())))
  269.  
  270.  
  271.  
  272.           -u   If the -u option is given, backspaces are treated as
  273.                printable characters; that is, they are sent to the
  274.                terminal when they appear in the input.
  275.  
  276.           -U   If the -U option is given, backspaces are not printed.
  277.  
  278.                If neither -u nor -U is given, backspaces which appear
  279.                adjacent to an underscore character are treated
  280.                specially:  the underlined text is displayed using the
  281.                terminal's hardware underlining capability.  Also,
  282.                backspaces which appear between two identical
  283.                characters are treated specially: the overstruck text
  284.                is printed using the terminal's hardware boldface
  285.                capability.  Other backspaces are deleted, along with
  286.                the preceeding character.
  287.  
  288.           -p   Normally, _l_e_s_s will repaint the screen by scrolling
  289.                from the bottom of the screen.  If the -p option is
  290.                set, when _l_e_s_s needs to change the entire display, it
  291.                will clear the screen and paint from the top line down.
  292.  
  293.           -h   Normally, _l_e_s_s will scroll backwards when backwards
  294.                movement is necessary.  The -h option specifies a
  295.                maximum number of lines to scroll backwards.  If it is
  296.                necessary to move backwards more than this many lines,
  297.                the screen is repainted in a forward direction.  (If
  298.                the terminal does not have the ability to scroll
  299.                backwards, -h0 is implied.)
  300.  
  301.           -b   The -b_n option tells _l_e_s_s to use a non-standard buffer
  302.                size.  There are two standard (default) buffer sizes,
  303.                one is used when a file is being read and the other
  304.                when a pipe (standard input) is being read.  The
  305.                current defaults are 5 buffers for files and 12 for
  306.                pipes.  (Buffers are 1024 bytes.)  The number _n
  307.                specifies a different number of buffers to use.  The -b
  308.                may be followed by "f", in which case only the file
  309.                default is changed, or by "p" in which case only the
  310.                pipe default is changed.  Otherwise, both are changed.
  311.  
  312.           -c   Normally, when data is read by _l_e_s_s, it is scanned to
  313.                ensure that bit 7 (the high order bit) is turned off in
  314.                each byte read, and to ensure that there are no null
  315.                (zero) bytes in the data (null bytes are turned into
  316.                "@" characters).  If the data is known to be "clean",
  317.                the -c option will tell _l_e_s_s to skip this checking,
  318.                causing an imperceptible speed improvement.  (However,
  319.                if the data is not "clean", unpredictable results may
  320.                occur.)
  321.  
  322.           +    If a command line option begins with ++++, the remainder
  323.                of that option is taken to be an initial command to
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 4/22/88)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      LLLLEEEESSSSSSSS(((())))                       MMMMSSSS----DDDDOOOOSSSS                        LLLLEEEESSSSSSSS(((())))
  335.  
  336.  
  337.  
  338.                _l_e_s_s. For example, +G tells _l_e_s_s to start at the end of
  339.                the file rather than the beginning, and +/xyz tells it
  340.                to start at the first occurence of "xyz" in the file.
  341.                As a special case, +<number> acts like +<number>g; that
  342.                is, it starts the display at the specified line number
  343.                (however, see the caveat under the "g" command above).
  344.                If the option starts with ++++++++, the initial command
  345.                applies to every file being viewed, not just the first
  346.                one.  The + command described previously may also be
  347.                used to set (or change) an initial command for every
  348.                file.
  349.  
  350.  
  351.      BBBBUUUUGGGGSSSS
  352.           When used on standard input (rather than a file), you can
  353.           move backwards only a finite amount, corresponding to that
  354.           portion of the file which is still buffered.  The -b option
  355.           may be used to expand the buffer space.
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                                          (printed 4/22/88)
  394.  
  395.  
  396.  
  397.