home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / most423.zip / most.doc < prev    next >
Text File  |  1994-01-28  |  14KB  |  397 lines

  1.  
  2.  
  3.  
  4.    1 June 1992                                                        MOST(1)
  5.  
  6.  
  7.  
  8.    NAME
  9.      most - browse or page through a text file
  10.  
  11.    SYNOPSIS
  12.      most [-bstvw] [+_l_i_n_e_n_o] [+c] [+d] [+/_s_t_r_i_n_g] [_f_i_l_e_n_a_m_e...]
  13.  
  14.    DESCRIPTION
  15.      _m_o_s_t is a paging program that displays, one windowful at a time, the
  16.      contents of a file on a terminal.  It pauses after each windowful and
  17.      prints on the window status line the screen the file name, current line
  18.      number, and the percentage of the file so far displayed.
  19.  
  20.      Unlike other paging programs, _m_o_s_t is capable of displaying an arbitrary
  21.      number of windows as long as each window occupies at least two screen
  22.      lines.  Each window may contain the same file or a different file.  In
  23.      addition, each window has its own mode.  For example, one window may
  24.      display a file with its lines wrapped while another may be truncating
  25.      the lines.  Windows may be `locked' together in the sense that if one of
  26.      the locked windows scrolls, all locked windows will scroll.  _m_o_s_t is
  27.      also capable of ignoring lines that are indented beyond a user specified
  28.      value.  This is useful when viewing computer programs to pick out gross
  29.      features of the code.  See the `:o' command for a description of this
  30.      feature.
  31.  
  32.      In addition to displaying ordinary text files, _m_o_s_t can also display
  33.      binary files as well as files with arbitrary ascii characters.  When a
  34.      file is read into a buffer, _m_o_s_t examines the first 32 bytes of the file
  35.      to determine if the file is a binary file and then switches to the
  36.      appropriate mode.  However, this feature may be disabled with the -k
  37.      option.  See the description of the -b, -k, -v, and -t options for
  38.      further details.
  39.  
  40.      Text files may contain combinations of underscore and backspace charac-
  41.      ters causing a printer to underline or overstrike.  When _m_o_s_t recognizes
  42.      this, it inserts the appropriate escape sequences to achieve the desired
  43.      effect.  In addition, some files cause the printer to overstrike some
  44.      characters by embedding carriage return characters in the middle of a
  45.      line.  When this occurs, _m_o_s_t displays the overstruck character with a
  46.      bold attribute.  This feature facilitates the reading of UNIX man pages
  47.      or a document produced by _r_u_n_o_f_f.  In particular, viewing this document
  48.      with _m_o_s_t should illustrate this behavior provided that the underline
  49.      characters have not been stripped.  This may be turned off with the -v
  50.      option.
  51.  
  52.      By default, lines with more characters than the terminal width are not
  53.      wrapped but are instead truncated.  When truncation occurs, this is
  54.      indicated by a `$' in the far right column of the terminal screen.  The
  55.      RIGHT and LEFT arrow keys may be used to view lines which extend past
  56.      the margins of the screen.  The -w option may be used to override this
  57.      feature.  When a window is wrapped, the character `\' will appear at the
  58.      right edge of the window.
  59.  
  60.  
  61.  
  62.  
  63.                                                                             1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.    MOST(1)                                                        1 June 1992
  71.  
  72.  
  73.      Commands are listed below.
  74.  
  75.    OPTIONS
  76.  
  77.      -1   VT100 mode.  This is meaningful only on VMS systems.  This option
  78.           should be used if the terminal is strictly a VT100.  This implies
  79.           that the terminal does not have the ability to delete and insert
  80.           multiple lines.  VT102s and above have this ability.
  81.  
  82.      -b   Binary mode.  Use this switch when you want to view files contain-
  83.           ing 8 bit characters.  _m_o_s_t will display the file 16 bytes per line
  84.           in hexidecimal notation.  A typical line looks like:
  85.  
  86.  
  87.                01000000 40001575 9C23A020 4000168D     ....@..u.#. @...
  88.  
  89.           When used with the -v option, the same line looks like:
  90.  
  91.  
  92.                ^A^@^@^@  @^@^U u 9C #A0    @^@^V8D     ....@..u.#. @...
  93.  
  94.      -k   `Kanji' option.  Ordinarily, _m_o_s_t will go into binary mode if the
  95.           file consists of non-ascii characters.  Sometimes this feature is
  96.           not desirable since some terminals have a special interpretation
  97.           for eight bit characters.  The -k option turns off the automatic
  98.           sensing.
  99.  
  100.      -s   Squeeze.  Replace multiple blank lines with a single blank line.
  101.  
  102.      -v   Display control characters as in `^A' for control A.  Normally _m_o_s_t
  103.           does not interpret control characters.
  104.  
  105.      -t   Display tabs as `^I'.  This option is meaningful only when used
  106.           with the -v option.  +_l_i_n_e_n_o Start up at _l_i_n_e_n_o.
  107.  
  108.      +c   Make search case sensitive.  By default, they are not.
  109.  
  110.      +d   This switch should only be used if you want the option to delete a
  111.           file while viewing it.  This makes it easier to clean unwanted
  112.           files out of a directory.  The file is deleted with the interactive
  113.           key sequence `:D' and then confirming with `y'.
  114.  
  115.      +/_s_t_r_i_n_g
  116.           Start up at the line containing the first occurrence of _s_t_r_i_n_g.
  117.  
  118.    COMMAND USAGE
  119.      The commands take effect immediately; it is not necessary to type a car-
  120.      riage return.
  121.  
  122.      In the following commands, _i is a numerical argument (1 by default).
  123.  
  124.      SPACE, CTRL-D, NEXT_SCREEN
  125.           Display another windowful, or jump _i windowfuls if _i is specified.
  126.  
  127.  
  128.  
  129.    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.    1 June 1992                                                        MOST(1)
  137.  
  138.  
  139.      RETURN, DOWN_ARROW, V, CTRL-N
  140.           Display another line, or _i more lines, if specified.
  141.  
  142.      UP_ARROW, ^, CTRL-P
  143.           Display previous line, or _i previous lines, if specified.
  144.  
  145.      T, ESCAPE<
  146.           Move to top of buffer.
  147.  
  148.      B, ESCAPE>
  149.           Move to bottom of buffer.
  150.  
  151.      RIGHT_ARROW, TAB, >
  152.           Scroll window left 60_i columns to view lines that are beyond the
  153.           right margin of the window.
  154.  
  155.      LEFT_ARROW, CTRL-B, <
  156.           Scroll window right 60_i columns to view lines that are beyond the
  157.           left margin of the window.
  158.  
  159.      U, CTRL-U, DELETE, PREV_SCREEN
  160.           Skip back _i windowfuls and then print a windowful.
  161.  
  162.      R, CTRL-R
  163.           Redraw the window.
  164.  
  165.      J, G If _i is not specified, then prompt for a line number then jump to
  166.           that line otherwise just jump to line _i.
  167.  
  168.      %    If _i is not specified, then prompt for a percent number then jump
  169.           to that percent of the file otherwise just jump to _i percent of the
  170.           file.
  171.  
  172.      W, w If the current screen width is 80, make it 132 and vice-versa.  For
  173.           other values, this command is ignored.
  174.  
  175.      Q, CTRL-X CTRL-C, CTRL-K E
  176.           Exit from _m_o_s_t.  On VMS, ^Z also exits.
  177.  
  178.      h, CTRL-H, HELP,
  179.           Help.  Give a description of all the _m_o_s_t commands.  The _m_o_s_t
  180.           environment variable MOST_HELP must be set for this to be meaning-
  181.           ful.
  182.  
  183.      f, /, CTRL-F, FIND, GOLD PF3
  184.           Prompt for a string and search forward from the current line for
  185.           _ith distinct line containing the string.  CTRL-G aborts.
  186.  
  187.      ?    Prompt for a string and search backward for the _ith distinct line
  188.           containing the string.  CTRL-G aborts.
  189.  
  190.      n    Search for the next _i lines containing an occurrence of the last
  191.           search string in the direction of the previous search.
  192.  
  193.  
  194.  
  195.                                                                             3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.    MOST(1)                                                        1 June 1992
  203.  
  204.  
  205.      m, SELECT, CTRL-@, CTRL-K M, PERIOD
  206.           Set a mark on the current line for later reference.
  207.  
  208.      INSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD
  209.           Set a mark on the current line but return to previous mark.  This
  210.           allows the user to toggle back and forth between two positions in
  211.           the file.
  212.  
  213.      l, L Toggle locking for this window.  The window is locked if there is a
  214.           `*' at the left edge of the status line.  Windows locked together,
  215.           scroll together.
  216.  
  217.      CTRL-X 2, CTRL-W 2, GOLD X
  218.           Split this window in half.
  219.  
  220.      CTRL-X o, CTRL-W o, o,
  221.           Move to other window.
  222.  
  223.      CTRL-X 0, CTRL-W 0, GOLD V
  224.           Delete this window.
  225.  
  226.      CTRL-X 1, CTRL-W 1, GOLD O
  227.           Delete all other windows, leaving only one window.
  228.  
  229.      E, e Edit this file.  This does not spawn an editor, rather _m_o_s_t uses
  230.           callable EDT and TPU routines to perform the editing task.  In
  231.           addition, _m_o_s_t can attach to a kept editor.  See the above discus-
  232.           sion of the environment variable MOST_EDITOR.
  233.  
  234.      $, ESC $
  235.           This is system dependent.  On VMS, this causes _m_o_s_t to spawn a sub-
  236.           process.  When the user exits the process, _m_o_s_t is resumed.  On
  237.           UNIX systems, _m_o_s_t simply suspends itself.
  238.  
  239.      :n   Skip to the next filename given in the command line.  Use the arrow
  240.           keys to scroll forward or backward through the file list.  `Q'
  241.           quits _m_o_s_t and any other key selects the given file.
  242.  
  243.      :c   Toggle case sensitive search.
  244.  
  245.      :D   Delete current file.  This command is only meaningful with the +d
  246.           switch.
  247.  
  248.      :o, :O
  249.           Toggle various options.  With this key sequence, _m_o_s_t displays a
  250.           prompt asking the user to hit one of: bdtvw.  The `b', `t', `v',
  251.           and `w' options have the same meaning as the command line switches.
  252.           For example, the `w' option will toggle wrapping on and off for the
  253.           current window.
  254.  
  255.           The `d' option must be used with a prefix integer _i.  All lines
  256.           indented beyond _i columns will not be displayed.  For example, con-
  257.           sider the fragment:
  258.  
  259.  
  260.  
  261.    4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.    1 June 1992                                                        MOST(1)
  269.  
  270.  
  271.  
  272.                int main(int argc, char **argv)
  273.                {
  274.                     int i;
  275.  
  276.                     for (i = 0; i < argc, i++)
  277.                     {
  278.                          fprintf(stdout,"%i: %s\n",i,argv[i]);
  279.                     }
  280.                     return 0;
  281.                }
  282.  
  283.           The key sequence `1:od' will cause _m_o_s_t to display the file ignor-
  284.           ing all lines indented beyond the first column.  So for the example
  285.           above, _m_o_s_t would display:
  286.  
  287.  
  288.                int main(int argc, char **argv)...
  289.                }
  290.  
  291.           where the `...' indicates lines follow are not displayed.
  292.  
  293.    HINTS
  294.      CTRL-G aborts the commands requiring the user to type something in at a
  295.      prompt.  The backquote key has a special meaning here.  It is used to
  296.      quote certain characters.  This is useful when search for the occurrence
  297.      of a string with a control character or a string at the beginning of a
  298.      line.  In the latter case, to find the occurrence of `The' at the begin-
  299.      ning of a line, enter `^JThe where ` quotes the CTRL-J.
  300.  
  301.    ENVIRONMENT
  302.      _m_o_s_t uses the following environment variables:
  303.  
  304.      MOST_SWITCHES
  305.           This variable sets commonly used switches.  For example, some peo-
  306.           ple prefer to use _m_o_s_t with the -s option so that excess blank
  307.           lines are not displayed.  On VMS this is normally done done in the
  308.           login.com through the line:
  309.  
  310.  
  311.                $ define MOST_SWITCHES "-s"
  312.  
  313.      MOST_EDITOR (VMS only)
  314.           Set this logical to one of three values: EDT, TPU, or EMACS.  The
  315.           default is EDT.  _m_o_s_t does not spawn an editor.  Rather, it uses
  316.           callable EDT and TPU to perform the editing task.  Since VMS does
  317.           not support callable EMACS, _m_o_s_t will attempt to attach to a kept
  318.           EMACS.  For this case, _m_o_s_t looks for the logical name EMACS_PID
  319.           and attaches to the process with that pid.  It then defines the
  320.           logicals EMACS_FILE_NAME and EMACS_FILE_LINE which EMACS can check
  321.           upon attaching to it.
  322.  
  323.      MOST_HELP
  324.           This variable must be setup to point to the _m_o_s_t helpfile.  Without
  325.  
  326.  
  327.                                                                             5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.    MOST(1)                                                        1 June 1992
  335.  
  336.  
  337.           this _m_o_s_t will not be able to provide online help.  However, this
  338.           behavior may be changed at compile time.  See the Makefile for more
  339.           information.
  340.  
  341.    BUGS
  342.      Almost all of the known bugs or limitations of _m_o_s_t are due to a desire
  343.      to read and interpret control characters in files.  One problem concerns
  344.      the use of backspace characters to underscore or overstrike other char-
  345.      acters.  _m_o_s_t makes an attempt to use terminal escape sequences to simu-
  346.      late this behavior.  One side effect is the one does not always get what
  347.      one expects when scrolling right and left through a file.  When in
  348.      doubt, use the -v and -b options of _m_o_s_t.
  349.  
  350.      String may not work properly with binary files.
  351.  
  352.    AUTHOR
  353.      John E. Davis
  354.      davis@amy.tch.harvard.edu
  355.  
  356.    ACKNOWLEDGEMENTS
  357.      I would like to thank the users of _m_o_s_t for valuable comments and criti-
  358.      cisms.  I would especially like to thank those individuals who have con-
  359.      tributed code to _m_o_s_t:
  360.  
  361.      Mats Akerberg, Henk D. Davids, Rex O. Livingston, and Mark Pizzolato
  362.  
  363.      I would also like to thank Shinichi Hama for his valuable criticisms of
  364.      _m_o_s_t.
  365.  
  366.      Thanks to David W. Sanderson (dws@cs.wisc.edu) for adapting the documen-
  367.      tation to nroff man page source format.
  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.    6
  394.  
  395.  
  396.