Removed double quotes around case arguments in test scripts.
[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.
122 .PP
123 If the file is writable and has been modified, then using
124 .B quit
125 will query the user if the file should be updated.
126 .PP
127 The
128 .B \-prompt
129 .I string
130 switch sets the prompting string for
131 .BR msh .
132 .PP
133 You may wish to use an alternate
134 .B nmh
135 profile for the commands that
136 .B msh
137 executes; see
138 .BR mh-profile (5)
139 for details about the
140 .B $MH
141 environment variable.
142 .PP
143 The
144 .B exit
145 command is identical to the
146 .B quit
147 command in
148 .BR msh .
149 .PP
150 .B msh
151 supports an output redirection facility.  Commands may be
152 followed by one of
153 .PP
154 .RS 5
155 .nf
156 .ta \w'| \fIcommand\fR  'u
157 ^> \fIfile\fR~^write output to \fIfile\fR
158 ^>> \fIfile\fR~^append output to \fIfile\fR
159 ^| \fIcommand\fR~^pipe output to UNIX \fIcommand\fR
160 .fi
161 .RE
162 .PP
163 If
164 .I file
165 starts with a \*(lq\~\*(rq (tilde), then a
166 .BR csh \-like
167 expansion
168 takes place.  Note that
169 .I command
170 is interpreted by
171 .BR sh .
172 Also note that
173 .B msh
174 does NOT support history substitutions, variable
175 substitutions, or alias substitutions.
176 .PP
177 When parsing commands to the left of any redirection symbol,
178 .B msh
179 will honor `\\' (back\-slash) as the quote next\-character symbol, and
180 `\*(lq' (double\-quote) as quote\-word delimiters.  All other input tokens
181 are separated by whitespace (spaces and tabs).
182
183 .SH FILES
184 .fc ^ ~
185 .nf
186 .ta \w'%etcdir%/ExtraBigFileName  'u
187 ^$HOME/\&.mh\(ruprofile~^The user profile
188 ^%etcdir%/mts.conf~^nmh mts configuration file
189 .fi
190
191 .SH "PROFILE COMPONENTS"
192 .fc ^ ~
193 .nf
194 .ta 2.4i
195 .ta \w'ExtraBigProfileName  'u
196 ^Path:~^To determine the user's nmh directory
197 ^Msg\-Protect:~^To set mode when creating a new `file'
198 ^fileproc:~^Program to file messages
199 ^showproc:~^Program to show messages
200 .fi
201
202 .SH "SEE ALSO"
203 packf(1)
204
205 .SH DEFAULTS
206 .nf
207 .RB ` file "' defaults to \*(lq./msgbox\*(rq"
208 .RB ` "\-prompt\ (msh)\ "'
209 .RB ` \-noscan '
210 .RB ` \-notopcur '
211 .fi
212
213 .SH CONTEXT
214 None
215
216 .SH BUGS
217 The argument to the
218 .B \-prompt
219 switch must be interpreted as a single
220 token by the shell that invokes
221 .BR msh .
222 Therefore, one must usually
223 place the argument to this switch inside double\-quotes.
224 .PP
225 There is a strict limit of messages per file in
226 .BR packf 'd
227 format which
228 .B msh
229 can handle.  Usually, this limit is 1000 messages.
230 .PP
231 Please remember that
232 .B msh
233 is not the C\-Shell, and that a lot of
234 the nice facilities provided by the latter are not present in the former.
235 .PP
236 In particular,
237 .B msh
238 does not understand back\-quoting, so the only
239 effective way to use
240 .B pick
241 inside
242 .B msh
243 is to always use the
244 .B \-seq
245 .I select
246 switch.  Clever users of
247 .B nmh
248 will put the line
249 .P
250 .RS 5
251 pick:\0\-seq\0select\0\-list
252 .RE
253 .PP
254 in their
255 .I \&.mh\(ruprofile
256 file so that
257 .B pick
258 works equally well from both the shell and
259 .BR msh .
260 .PP
261 .B sortm
262 always uses
263 .B \-noverbose
264 and if
265 .B \-textfield
266 .I field
267 is used,
268 .B \-limit
269 .IR 0 .
270 .PP
271 The
272 .B msh
273 program inherits most (if not all) of the bugs from the
274 .B nmh
275 commands it implements.