Removed unused vmh.c and wmh.c.
[mmh] / man / msh.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MSH %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 msh \- nmh shell (and BBoard reader)
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B msh
11 .RB [ \-prompt
12 .IR string ]
13 .RB [ \-scan " | " \-noscan ]
14 .RB [ \-topcur " | " \-notopcur ]
15 .RI [ file ]
16 .RB [ \-version ]
17 .RB [ \-help ]
18 .ad
19 .SH DESCRIPTION
20 .B msh
21 is an interactive program that implements a subset of the normal
22 .B nmh
23 commands operating on a single file in
24 .BR packf 'd format.
25 That is,
26 .B msh
27 is used to read a file that contains a number
28 of messages, as opposed to the standard
29 .B nmh
30 style of reading
31 a number of files, each file being a separate message in a folder.
32 .BR msh 's
33 chief advantage is that the normal
34 .B nmh
35 style does not
36 allow a file to have more than one message in it.  Hence,
37 .B msh
38 is
39 ideal for reading BBoards, as these files are delivered by the
40 transport system in this format.  In addition,
41 .B msh
42 can be used on
43 other files, such as message archives which have been
44 .BR pack ed
45 (see
46 .BR packf (1)).
47 Finally,
48 .B msh
49 is an excellent
50 .B nmh
51 tutor.
52 As the only commands available to the user are
53 .B nmh
54 commands, this
55 allows
56 .B nmh
57 beginners to concentrate on how commands to
58 .B nmh
59 are formed and (more or less) what they mean.
60 .PP
61 When invoked,
62 .B msh
63 reads the named file, and enters a command loop.
64 The user may type most of the normal
65 .B nmh
66 commands.  The syntax and
67 semantics of these commands typed to
68 .B msh
69 are identical to their
70 .B nmh
71 counterparts.  In cases where the nature of
72 .B msh
73 would be
74 inconsistent (e.g., specifying a
75 .I +folder
76 with some commands),
77 .B msh
78 will duly inform the user.  The commands that
79 .B msh
80 currently supports
81 (in some slightly modified or restricted forms) are:
82 .PP
83 .RS 5
84 .nf
85 ali
86 burst
87 comp
88 dist
89 folder
90 forw
91 inc
92 mark
93 mhmail
94 mhn
95 msgchk
96 next
97 packf
98 pick
99 prev
100 refile
101 repl
102 rmm
103 scan
104 send
105 show
106 sortm
107 whatnow
108 whom
109 .fi
110 .RE
111 .PP
112 In addition,
113 .B msh
114 has a
115 .B help
116 command which gives a
117 brief overview.  To terminate
118 .BR msh ,
119 type CTRL\-D, or use the
120 .B quit
121 command.  If
122 .B msh
123 is being invoked from
124 .BR bbc ,
125 then typing CTRL\-D will also tell
126 .B bbc
127 to exit as well, while
128 using the
129 .B quit
130 command will return control to
131 .BR bbc ,
132 and
133 .B bbc
134 will continue examining the list of BBoards that it is scanning.
135 .PP
136 If the file is writable and has been modified, then using
137 .B quit
138 will query the user if the file should be updated.
139 .PP
140 The
141 .B \-prompt
142 .I string
143 switch sets the prompting string for
144 .BR msh .
145 .PP
146 You may wish to use an alternate
147 .B nmh
148 profile for the commands that
149 .B msh
150 executes; see
151 .BR mh-profile (5)
152 for details about the
153 .B $MH
154 environment variable.
155 .PP
156 When invoked from
157 .BR bbc ,
158 two special features are enabled:
159 First, the
160 .B \-scan
161 switch directs
162 .B msh
163 to do a
164 .RB \*(lq scan
165 .BR unseen \*(rq
166 on start\-up if new items are present in the BBoard.  This feature is
167 best used from
168 .BR bbc ,
169 which correctly sets the stage.  Second, the
170 .B mark
171 command in
172 .B msh
173 acts specially when you are reading a
174 BBoard, since
175 .B msh
176 will consult the sequence \*(lqunseen\*(rq in
177 determining what messages you have actually read.  When
178 .B msh
179 exits,
180 it reports this information to
181 .BR bbc .
182 In addition, if you give the
183 .B mark
184 command with no arguments,
185 .B msh
186 will interpret it as
187 .RB \*(lq mark
188 .B \-sequence
189 .B unseen
190 .B \-delete
191 .B \-nozero
192 .BR all \*(rq
193 Hence, to discard
194 all of the messages in the current BBoard you're reading, just use the
195 .B mark
196 command with no arguments.
197 .PP
198 Normally, the
199 .B exit
200 command is identical to the
201 .B quit
202 command in
203 .BR msh .
204 When run under
205 .B bbc
206 however,
207 .B exit
208 directs
209 .B msh
210 to mark all messages as seen and then
211 .BR quit .
212 For speedy type\-in, this command is often abbreviated as just
213 .BR qe .
214 .PP
215 .B msh
216 supports an output redirection facility.  Commands may be
217 followed by one of
218 .PP
219 .RS 5
220 .nf
221 .ta \w'| \fIcommand\fR  'u
222 ^> \fIfile\fR~^write output to \fIfile\fR
223 ^>> \fIfile\fR~^append output to \fIfile\fR
224 ^| \fIcommand\fR~^pipe output to UNIX \fIcommand\fR
225 .fi
226 .RE
227 .PP
228 If
229 .I file
230 starts with a \*(lq\~\*(rq (tilde), then a
231 .BR csh \-like
232 expansion
233 takes place.  Note that
234 .I command
235 is interpreted by
236 .BR sh .
237 Also note that
238 .B msh
239 does NOT support history substitutions, variable
240 substitutions, or alias substitutions.
241 .PP
242 When parsing commands to the left of any redirection symbol,
243 .B msh
244 will honor `\\' (back\-slash) as the quote next\-character symbol, and
245 `\*(lq' (double\-quote) as quote\-word delimiters.  All other input tokens
246 are separated by whitespace (spaces and tabs).
247
248 .SH FILES
249 .fc ^ ~
250 .nf
251 .ta \w'%etcdir%/ExtraBigFileName  'u
252 ^$HOME/\&.mh\(ruprofile~^The user profile
253 ^%etcdir%/mts.conf~^nmh mts configuration file
254 .fi
255
256 .SH "PROFILE COMPONENTS"
257 .fc ^ ~
258 .nf
259 .ta 2.4i
260 .ta \w'ExtraBigProfileName  'u
261 ^Path:~^To determine the user's nmh directory
262 ^Msg\-Protect:~^To set mode when creating a new `file'
263 ^fileproc:~^Program to file messages
264 ^showproc:~^Program to show messages
265 .fi
266
267 .SH "SEE ALSO"
268 bbc(1)
269
270 .SH DEFAULTS
271 .nf
272 .RB ` file "' defaults to \*(lq./msgbox\*(rq"
273 .RB ` "\-prompt\ (msh)\ "'
274 .RB ` \-noscan '
275 .RB ` \-notopcur '
276 .fi
277
278 .SH CONTEXT
279 None
280
281 .SH BUGS
282 The argument to the
283 .B \-prompt
284 switch must be interpreted as a single
285 token by the shell that invokes
286 .BR msh .
287 Therefore, one must usually
288 place the argument to this switch inside double\-quotes.
289 .PP
290 There is a strict limit of messages per file in
291 .BR packf 'd
292 format which
293 .B msh
294 can handle.  Usually, this limit is 1000 messages.
295 .PP
296 Please remember that
297 .B msh
298 is not the C\-Shell, and that a lot of
299 the nice facilities provided by the latter are not present in the former.
300 .PP
301 In particular,
302 .B msh
303 does not understand back\-quoting, so the only
304 effective way to use
305 .B pick
306 inside
307 .B msh
308 is to always use the
309 .B \-seq
310 .I select
311 switch.  Clever users of
312 .B nmh
313 will put the line
314 .P
315 .RS 5
316 pick:\0\-seq\0select\0\-list
317 .RE
318 .PP
319 in their
320 .I \&.mh\(ruprofile
321 file so that
322 .B pick
323 works equally well from both the shell and
324 .BR msh .
325 .PP
326 .B sortm
327 always uses
328 .B \-noverbose
329 and if
330 .B \-textfield
331 .I field
332 is used,
333 .B \-limit
334 .IR 0 .
335 .PP
336 The
337 .B msh
338 program inherits most (if not all) of the bugs from the
339 .B nmh
340 commands it implements.