Fixed formatting glitch in msh.man.
[mmh] / man / msh.man
1 .TH MSH %manext1% "November 6, 2012" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
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
25 format.
26 That is,
27 .B msh
28 is used to read a file that contains a number
29 of messages, as opposed to the standard
30 .B nmh
31 style of reading
32 a number of files, each file being a separate message in a folder.
33 .BR msh 's
34 chief advantage is that the normal
35 .B nmh
36 style does not
37 allow a file to have more than one message in it.  Hence,
38 .B msh
39 is
40 ideal for reading BBoards, as these files are delivered by the
41 transport system in this format.  In addition,
42 .B msh
43 can be used on
44 other files, such as message archives which have been
45 .BR pack ed
46 (see
47 .IR packf (1)).
48 Finally,
49 .B msh
50 is an excellent
51 .B nmh
52 tutor.
53 As the only commands available to the user are
54 .B nmh
55 commands, this
56 allows
57 .B nmh
58 beginners to concentrate on how commands to
59 .B nmh
60 are formed and (more or less) what they mean.
61 .PP
62 When invoked,
63 .B msh
64 reads the named file, and enters a command loop.
65 The user may type most of the normal
66 .B nmh
67 commands.  The syntax and
68 semantics of these commands typed to
69 .B msh
70 are identical to their
71 .B nmh
72 counterparts.  In cases where the nature of
73 .B msh
74 would be
75 inconsistent (e.g., specifying a
76 .I +folder
77 with some commands),
78 .B msh
79 will duly inform the user.  The commands that
80 .B msh
81 currently supports
82 (in some slightly modified or restricted forms) are:
83 .PP
84 .RS 5
85 .nf
86 ali
87 burst
88 comp
89 dist
90 folder
91 forw
92 inc
93 mark
94 mhmail
95 mhn
96 msgchk
97 next
98 packf
99 pick
100 prev
101 refile
102 repl
103 rmm
104 scan
105 send
106 show
107 sortm
108 whatnow
109 whom
110 .fi
111 .RE
112 .PP
113 In addition,
114 .B msh
115 has a
116 .B help
117 command which gives a
118 brief overview.  To terminate
119 .BR msh ,
120 type CTRL\-D, or use the
121 .B quit
122 command.
123 .PP
124 If the file is writable and has been modified, then using
125 .B quit
126 will query the user if the file should be updated.
127 .PP
128 The
129 .B \-prompt
130 .I string
131 switch sets the prompting string for
132 .BR msh .
133 .PP
134 You may wish to use an alternate
135 .B nmh
136 profile for the commands that
137 .B msh
138 executes; see
139 .IR mh-profile (5)
140 for details about the
141 .B $MH
142 environment variable.
143 .PP
144 The
145 .B exit
146 command is identical to the
147 .B quit
148 command in
149 .BR msh .
150 .PP
151 .B msh
152 supports an output redirection facility.  Commands may be
153 followed by one of
154 .PP
155 .RS 5
156 .nf
157 .ta \w'| \fIcommand\fR  'u
158 ^> \fIfile\fR~^write output to \fIfile\fR
159 ^>> \fIfile\fR~^append output to \fIfile\fR
160 ^| \fIcommand\fR~^pipe output to UNIX \fIcommand\fR
161 .fi
162 .RE
163 .PP
164 If
165 .I file
166 starts with a \*(lq\~\*(rq (tilde), then a
167 .BR csh \-like
168 expansion
169 takes place.  Note that
170 .I command
171 is interpreted by
172 .BR sh .
173 Also note that
174 .B msh
175 does NOT support history substitutions, variable
176 substitutions, or alias substitutions.
177 .PP
178 When parsing commands to the left of any redirection symbol,
179 .B msh
180 will honor `\\' (backslash) as the quote next\-character symbol, and
181 `\*(lq' (double\-quote) as quote\-word delimiters.  All other input tokens
182 are separated by whitespace (spaces and tabs).
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 .SH "PROFILE COMPONENTS"
191 .fc ^ ~
192 .nf
193 .ta 2.4i
194 .ta \w'ExtraBigProfileName  'u
195 ^Path:~^To determine the user's nmh directory
196 ^Msg\-Protect:~^To set mode when creating a new `file'
197 ^fileproc:~^Program to file messages
198 ^showproc:~^Program to show messages
199 .fi
200 .SH "SEE ALSO"
201 .IR packf (1)
202 .SH DEFAULTS
203 .nf
204 .RB ` file "' defaults to \*(lq./msgbox\*(rq"
205 .RB ` "\-prompt\ (msh)\ "'
206 .RB ` \-noscan '
207 .RB ` \-notopcur '
208 .fi
209 .SH CONTEXT
210 None
211 .SH BUGS
212 .PP
213 There is a strict limit of messages per file in
214 .BR packf 'd
215 format which
216 .B msh
217 can handle.  Usually, this limit is 1000 messages.
218 .PP
219 Please remember that
220 .B msh
221 is not the C\-Shell, and that a lot of
222 the nice facilities provided by the latter are not present in the former.
223 .PP
224 In particular,
225 .B msh
226 does not understand backquoting, so the only
227 effective way to use
228 .B pick
229 inside
230 .B msh
231 is to always use the
232 .B \-seq
233 .I select
234 switch.  Clever users of
235 .B nmh
236 will put the line
237 .P
238 .RS 5
239 pick:\0\-seq\0select\0\-list
240 .RE
241 .PP
242 in their
243 .I \&.mh\(ruprofile
244 file so that
245 .B pick
246 works equally well from both the shell and
247 .BR msh .
248 .PP
249 .B sortm
250 always uses
251 .B \-noverbose
252 and if
253 .B \-textfield
254 .I field
255 is used,
256 .B \-limit
257 .IR 0 .
258 .PP
259 The
260 .B msh
261 program inherits most (if not all) of the bugs from the
262 .B nmh
263 commands it implements.