4.3BSD-UWisc/man/catl/msh.l




MSH(1)              UNIX Programmer's Manual               MSH(1)



NAME
     msh - MH shell (and BBoard reader)

SYNOPSIS
     msh [-prompt string] [-scan] [-noscan] [-topcur] [-notopcur]
          [file] [-help]
9     _m_s_h is an interactive program that implements a subset of
     the normal _M_H commands operating on a single file in _p_a_c_k_f'd
     format.  That is, _m_s_h is used to read a file that contains a
     number of messages, as opposed to the standard _M_H style of
     reading a number of files, each file being a separate mes-
     sage in a folder.  _m_s_h's chief advantage is that the normal
     _M_H style does not allow a file to have more than one message
     in it.  Hence, _m_s_h is ideal for reading _B_B_o_a_r_d_s, as these
     files are delivered by the transport system in this format.
     In addition, _m_s_h can be used on other files, such as message
     archives which have been _p_a_c_ked (see _p_a_c_k_f (1)).  Finally,
     _m_s_h is an excellent _M_H tutor.  As the only commands avail-
     able to the user are _M_H commands, this allows _M_H beginners
     to concentrate on how commands to _M_H are formed and (more or
     less) what they mean.

     When invoked, _m_s_h reads the named file, and enters a command
     loop.  The user may type most of the normal _M_H commands.
     The syntax and semantics of these commands typed to _m_s_h are
     identical to their _M_H counterparts.  In cases where the
     nature of _m_s_h would be inconsistent (e.g., specifying a
     `+folder' with some commands), _m_s_h will duly inform the
     user.  The commands that _m_s_h currently supports (in some
     slightly modified or restricted forms) are:

          ali
          burst
          comp
          dist
          folder
          forw
          inc
          mark
          mhmail
          msgchk
          next
          packf
          pick
          prev
          refile
          repl
          rmm
          scan
          send
          show
          sortm



Printed 1/10/87                MH                               1


9


MSH(1)              UNIX Programmer's Manual               MSH(1)



          whatnow
          whom

     In addition, _m_s_h has a "help" command which gives a brief
     overview.  To terminate _m_s_h, type CTRL-D, or use the "quit"
     command.  If _m_s_h is being invoked from _b_b_c, then typing
     CTRL-D will also tell _b_b_c to exit as well, while using the
     "quit" command will return control to _b_b_c, and _b_b_c will con-
     tinue examining the list of BBoards that it is scanning.

     If the file is writable and has been modified, then using
     "quit" will query the user if the file should be updated.

     The `-prompt string' switch sets the prompting string for
     _m_s_h.

     You may wish to use an alternate _M_H profile for the commands
     that _m_s_h executes; see _m_h-_p_r_o_f_i_l_e (5) for details about the
     $MH envariable.

     When invoked from _b_b_c, two special features are enabled:
     First, the `-scan' switch directs _m_s_h to do a `scan unseen'
     on start-up if new items are present in the BBoard.  This
     feature is best used from _b_b_c, which correctly sets the
     stage.  Second, the _m_a_r_k command in _m_s_h acts specially when
     you are reading a BBoard, since _m_s_h will consult the
     sequence "unseen" in determining what messages you have
     actually read.  When _m_s_h exits, it reports this information
     to _b_b_c.  In addition, if you give the _m_a_r_k command with no
     arguments, _m_s_h will interpret it as
     `mark -sequence unseen -delete -nozero all' Hence, to dis-
     card all of the messages in the current BBoard you're read-
     ing, just use the _m_a_r_k command with no arguments.

     Normally, the "exit" command is identical to the "quit" com-
     mand in _m_s_h.  When run under _b_b_c however, "exit" directs _m_s_h
     to mark all messages as seen and then "quit".  For speedy
     type-in, this command is often abbreviated as just "e".

     When invoked from _v_m_h, another special feature is enabled:
     The `topcur' switch directs _m_s_h to have the current message
     "track" the top line of the _v_m_h scan window.  Normally, _m_s_h
     has the current message "track" the center of the window
     (under `-notopcur', which is the default).

     _m_s_h supports an output redirection facility.  Commands may
     be followed by one of

          > _f_i_l_e     write output to _f_i_l_e
          >> _f_i_l_e    append output to _f_i_l_e
          | _c_o_m_m_a_n_d  pipe output to UNIX _c_o_m_m_a_n_d




Printed 1/10/87                MH                               2






MSH(1)              UNIX Programmer's Manual               MSH(1)



     If _f_i_l_e starts with a `~' (tilde), then a _c_s_h-like expansion
     takes place.  Note that _c_o_m_m_a_n_d is interpreted by _s_h (1).
     Also note that _m_s_h does NOT support history substitutions,
     variable substitutions, or alias substitutions.

     When parsing commands to the left of any redirection symbol,
     _m_s_h will honor `\' (back-slash) as the quote next-character
     symbol, and `"' (double-quote) as quote-word delimiters.
     All other input tokens are separated by whitespace (spaces
     and tabs).

FILES
     $HOME/.mh_profile                  The user profile
     /usr/misc/mh/lib/mtstailor         tailor file

PROFILE COMPONENTS
     Path:                To determine the user's MH directory
     Msg-Protect:         To set mode when creating a new `file'
     fileproc:            Program to file messages
     showproc:            Program to show messages

SEE ALSO
     bbc(1)

DEFAULTS
     `file' defaults to "./msgbox"
     `-prompt (msh) '
     `-noscan'
     `-notopcur'

CONTEXT
     None

BUGS
     The argument to the `-prompt' switch must be interpreted as
     a single token by the shell that invokes _m_s_h.  Therefore,
     one must usually place the argument to this switch inside
     double-quotes.

     There is a strict limit of messages per file in _p_a_c_k_f'd for-
     mat which _m_s_h can handle.  Usually, this limit is 1000 mes-
     sages.

     Please remember that _m_s_h is not the _C_S_h_e_l_l, and that a lot
     of the nice facilities provided by the latter are not
     present in the former.

     In particular, _m_s_h does not understand back-quoting, so the
     only effective way to use _p_i_c_k inside _m_s_h is to always use
     the `-seq select' switch.  Clever users of _M_H will put the
     line




Printed 1/10/87                MH                               3






MSH(1)              UNIX Programmer's Manual               MSH(1)



          pick: -seq select -list

     in their .mh_profile file so that _p_i_c_k works equally well
     from both the shell and _m_s_h.

     The _m_s_h program inherits most (if not all) of the bugs from
     the _M_H commands it implements.
















































Printed 1/10/87                MH                               4