Remove RCS keywords, since they no longer work after git migration.
[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 When invoked from
216 .BR vmh ,
217 another special feature is enabled:
218 The `topcur' switch directs
219 .B msh
220 to have the current message
221 \*(lqtrack\*(rq the top line of the
222 .B vmh
223 scan window.  Normally,
224 .B msh
225 has the current message \*(lqtrack\*(rq the center of the window
226 (under
227 .BR \-notopcur ,
228 which is the default).
229 .PP
230 .B msh
231 supports an output redirection facility.  Commands may be
232 followed by one of
233 .PP
234 .RS 5
235 .nf
236 .ta \w'| \fIcommand\fR  'u
237 ^> \fIfile\fR~^write output to \fIfile\fR
238 ^>> \fIfile\fR~^append output to \fIfile\fR
239 ^| \fIcommand\fR~^pipe output to UNIX \fIcommand\fR
240 .fi
241 .RE
242 .PP
243 If
244 .I file
245 starts with a \*(lq\~\*(rq (tilde), then a
246 .BR csh \-like
247 expansion
248 takes place.  Note that
249 .I command
250 is interpreted by
251 .BR sh .
252 Also note that
253 .B msh
254 does NOT support history substitutions, variable
255 substitutions, or alias substitutions.
256 .PP
257 When parsing commands to the left of any redirection symbol,
258 .B msh
259 will honor `\\' (back\-slash) as the quote next\-character symbol, and
260 `\*(lq' (double\-quote) as quote\-word delimiters.  All other input tokens
261 are separated by whitespace (spaces and tabs).
262
263 .SH FILES
264 .fc ^ ~
265 .nf
266 .ta \w'%etcdir%/ExtraBigFileName  'u
267 ^$HOME/\&.mh\(ruprofile~^The user profile
268 ^%etcdir%/mts.conf~^nmh mts configuration file
269 .fi
270
271 .SH "PROFILE COMPONENTS"
272 .fc ^ ~
273 .nf
274 .ta 2.4i
275 .ta \w'ExtraBigProfileName  'u
276 ^Path:~^To determine the user's nmh directory
277 ^Msg\-Protect:~^To set mode when creating a new `file'
278 ^fileproc:~^Program to file messages
279 ^showproc:~^Program to show messages
280 .fi
281
282 .SH "SEE ALSO"
283 bbc(1)
284
285 .SH DEFAULTS
286 .nf
287 .RB ` file "' defaults to \*(lq./msgbox\*(rq"
288 .RB ` "\-prompt\ (msh)\ "'
289 .RB ` \-noscan '
290 .RB ` \-notopcur '
291 .fi
292
293 .SH CONTEXT
294 None
295
296 .SH BUGS
297 The argument to the
298 .B \-prompt
299 switch must be interpreted as a single
300 token by the shell that invokes
301 .BR msh .
302 Therefore, one must usually
303 place the argument to this switch inside double\-quotes.
304 .PP
305 There is a strict limit of messages per file in
306 .BR packf 'd
307 format which
308 .B msh
309 can handle.  Usually, this limit is 1000 messages.
310 .PP
311 Please remember that
312 .B msh
313 is not the C\-Shell, and that a lot of
314 the nice facilities provided by the latter are not present in the former.
315 .PP
316 In particular,
317 .B msh
318 does not understand back\-quoting, so the only
319 effective way to use
320 .B pick
321 inside
322 .B msh
323 is to always use the
324 .B \-seq
325 .I select
326 switch.  Clever users of
327 .B nmh
328 will put the line
329 .P
330 .RS 5
331 pick:\0\-seq\0select\0\-list
332 .RE
333 .PP
334 in their
335 .I \&.mh\(ruprofile
336 file so that
337 .B pick
338 works equally well from both the shell and
339 .BR msh .
340 .PP
341 .B sortm
342 always uses
343 .B \-noverbose
344 and if
345 .B \-textfield
346 .I field
347 is used,
348 .B \-limit
349 .IR 0 .
350 .PP
351 The
352 .B msh
353 program inherits most (if not all) of the bugs from the
354 .B nmh
355 commands it implements.