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