2 .\" @(#)$Id: msh.rf,v 1.9 1992/10/16 21:36:14 jromine Exp $
5 msh \- MH shell (and BBoard reader)
9 \%[\-scan] \%[\-noscan]
10 \%[\-topcur] \%[\-notopcur]
14 \fImsh\fR is an interactive program that
15 implements a subset of the normal \fIMH\fR commands
16 operating on a single file in \fIpackf\fR'd format.
17 That is, \fImsh\fR is used to read a file that contains a number of
19 as opposed to the standard
21 style of reading a number of files,
22 each file being a separate message in a folder.
23 \fImsh\fR's chief advantage is that the normal \fIMH\fR style does not allow
24 a file to have more than one message in it.
25 Hence, \fImsh\fR is ideal for reading \fIBBoards\fR,
26 as these files are delivered by the transport system in this format.
27 In addition, \fImsh\fR can be used on other files,
28 such as message archives which have been \fIpack\fRed (see \fIpackf\fR\0(1)).
29 Finally, \fImsh\fR is an excellent \fIMH\fR
31 As the only commands available to the user are \fIMH\fR commands,
32 this allows \fIMH\fR beginners to concentrate on how commands to
33 \fIMH\fR are formed and (more or less) what they mean.
35 When invoked, \fImsh\fR reads the named file, and enters a command loop.
36 The user may type most of the normal
39 The syntax and semantics of these commands typed to \fImsh\fR are
40 identical to their \fIMH\fR
41 counterparts. In cases where the nature of \fImsh\fR would be inconsistent
42 (e.g., specifying a `+folder' with some commands),
43 \fImsh\fR will duly inform the user.
44 The commands that \fImsh\fR currently supports
45 (in some slightly modified or restricted forms) are:
100 \fImsh\fR has a \*(lqhelp\*(rq command which gives a brief overview.
101 To terminate \fImsh\fR, type CTRL\-D, or use the \*(lqquit\*(rq command.
102 If \fImsh\fR is being invoked from \fIbbc\fR,
103 then typing CTRL\-D will also tell \fIbbc\fR to exit as well,
104 while using the \*(lqquit\*(rq command will return control to \fIbbc\fR,
105 and \fIbbc\fR will continue examining the list of BBoards
108 If the file is writable and has been modified,
109 then using \*(lqquit\*(rq will query the user if the file should be updated.
111 The `\-prompt string' switch sets the prompting string for \fImsh\fR.
113 You may wish to use an alternate \fIMH\fR profile for the commands that
115 see \fImh-profile\fR\0(5) for details about the \fB$MH\fR envariable.
117 When invoked from \fIbbc\fR,
118 two special features are enabled:
120 the `\-scan' switch directs \fImsh\fR to do a `scan\0unseen' on
121 start\-up if new items are present in the BBoard.
122 This feature is best used from \fIbbc\fR,
123 which correctly sets the stage.
125 the \fImark\fR command in \fImsh\fR acts specially when you are reading
127 since \fImsh\fR will consult the sequence \*(lqunseen\*(rq in determining
128 what messages you have actually read.
129 When \fImsh\fR exits, it reports this information to \fIbbc\fR.
130 In addition, if you give the \fImark\fR command with no arguments,
131 \fImsh\fR will interpret it
132 as `mark\0\-sequence\0unseen\0\-delete\0\-nozero\0all'
133 Hence, to discard all of the messages in the current BBoard you're
134 reading, just use the \fImark\fR command with no arguments.
136 Normally, the \*(lqexit\*(rq command is identical to the \*(lqquit\*(rq
137 command in \fImsh\fR.
138 When run under \fIbbc\fR however, \*(lqexit\*(rq directs \fImsh\fR to mark
139 all messages as seen and then \*(lqquit\*(rq.
141 this command is often abbreviated as just \*(lqe\*(rq.
143 When invoked from \fIvmh\fR,
144 another special feature is enabled:
145 The `topcur' switch directs \fImsh\fR to have the current message
146 \*(lqtrack\*(rq the top line of the \fIvmh\fR scan window.
147 Normally, \fImsh\fR has the current message \*(lqtrack\*(rq the center of the
148 window (under `\-notopcur', which is the default).
150 \fImsh\fR supports an output redirection facility.
151 Commands may be followed by one of
155 .ta \w'| \fIcommand\fR 'u
156 ^> \fIfile\fR~^write output to \fIfile\fR
157 ^>> \fIfile\fR~^append output to \fIfile\fR
158 ^| \fIcommand\fR~^pipe output to UNIX \fIcommand\fR
163 If \fIfile\fR starts with a `\~' (tilde),
164 then a \fIcsh\fR-like expansion takes place.
165 Note that \fIcommand\fR is interpreted by \fIsh\fR\0(1).
166 Also note that \fImsh\fR does NOT support
167 history substitutions, variable substitutions, or alias substitutions.
169 When parsing commands to the left of any redirection symbol,
170 \fImsh\fR will honor `\\' (back\-slash) as the quote next\-character symbol,
171 and `"' (double\-quote) as quote\-word delimiters.
172 All other input tokens are separated by whitespace
175 ^$HOME/\&.mh\(ruprofile~^The user profile
176 ^@(MHETCPATH)/mtstailor~^tailor file
178 ^Path:~^To determine the user's MH directory
180 ^Msg\-Protect:~^To set mode when creating a new `file'
182 ^fileproc:~^Program to file messages
184 ^showproc:~^Program to show messages
188 `file' defaults to \*(lq./msgbox\*(rq
198 The argument to the `\-prompt' switch must be interpreted as a single token
199 by the shell that invokes \fImsh\fR.
201 one must usually place the argument to this switch inside double\-quotes.
203 There is a strict limit of messages per file in \fIpackf\fR'd format which
204 \fImsh\fR can handle.
205 Usually, this limit is 1000 messages.
207 Please remember that \fImsh\fR is not the \fICShell\fR,
208 and that a lot of the nice facilities provided by the latter are not
209 present in the former.
211 In particular, \fImsh\fR does not understand back\-quoting,
212 so the only effective way to use \fIpick\fR inside \fImsh\fR is to always use
213 the `\-seq\0select' switch.
214 Clever users of \fIMH\fR will put the line
217 pick:\0\-seq\0select\0\-list
219 in their \&.mh\(ruprofile file so that \fIpick\fR works equally well from
220 both the shell and \fImsh\fR.
222 \fIsortm\fR always uses \*(lq\-noverbose\*(rq and
223 if \*(lq\-textfield\ field\*(lq is used, \*(lq\-limit 0\*(rq.
225 The \fImsh\fR program inherits most (if not all) of the bugs from the
226 \fIMH\fR commands it implements.