1MSH(1) [nmh-1.2-20070115cvs] MSH(1)
2
3
4
6 msh - nmh shell (and BBoard reader)
7
9 msh [-prompt string] [-scan | -noscan] [-topcur | -notopcur] [file]
10 [-version] [-help]
11
13 msh is an interactive program that implements a subset of the normal
14 nmh commands operating on a single file in packf'dformat. That is, msh
15 is used to read a file that contains a number of messages, as opposed
16 to the standard nmh style of reading a number of files, each file being
17 a separate message in a folder. msh's chief advantage is that the nor‐
18 mal nmh style does not allow a file to have more than one message in
19 it. Hence, msh is ideal for reading BBoards, as these files are deliv‐
20 ered by the transport system in this format. In addition, msh can be
21 used on other files, such as message archives which have been packed
22 (see packf(1)). Finally, msh is an excellent nmh tutor. As the only
23 commands available to the user are nmh commands, this allows nmh begin‐
24 ners to concentrate on how commands to nmh are formed and (more or
25 less) what they mean.
26
27 When invoked, msh reads the named file, and enters a command loop. The
28 user may type most of the normal nmh commands. The syntax and seman‐
29 tics of these commands typed to msh are identical to their nmh counter‐
30 parts. In cases where the nature of msh would be inconsistent (e.g.,
31 specifying a +folder with some commands), msh will duly inform the
32 user. The commands that msh currently supports (in some slightly modi‐
33 fied or restricted forms) are:
34
35 ali
36 burst
37 comp
38 dist
39 folder
40 forw
41 inc
42 mark
43 mhmail
44 mhn
45 msgchk
46 next
47 packf
48 pick
49 prev
50 refile
51 repl
52 rmm
53 scan
54 send
55 show
56 sortm
57 whatnow
58 whom
59
60 In addition, msh has a help command which gives a brief overview. To
61 terminate msh, type CTRL-D, or use the quit command. If msh is being
62 invoked from bbc, then typing CTRL-D will also tell bbc to exit as
63 well, while using the quit command will return control to bbc, and bbc
64 will continue examining the list of BBoards that it is scanning.
65
66 If the file is writable and has been modified, then using quit will
67 query the user if the file should be updated.
68
69 The -prompt string switch sets the prompting string for msh.
70
71 You may wish to use an alternate nmh profile for the commands that msh
72 executes; see mh-profile(5) for details about the $MH environment vari‐
73 able.
74
75 When invoked from bbc, two special features are enabled: First, the
76 -scan switch directs msh to do a “scan unseen” on start-up if new items
77 are present in the BBoard. This feature is best used from bbc, which
78 correctly sets the stage. Second, the mark command in msh acts spe‐
79 cially when you are reading a BBoard, since msh will consult the
80 sequence “unseen” in determining what messages you have actually read.
81 When msh exits, it reports this information to bbc. In addition, if
82 you give the mark command with no arguments, msh will interpret it as
83 “mark -sequence unseen -delete -nozero all” Hence, to discard all of
84 the messages in the current BBoard you're reading, just use the mark
85 command with no arguments.
86
87 Normally, the exit command is identical to the quit command in msh.
88 When run under bbc however, exit directs msh to mark all messages as
89 seen and then quit. For speedy type-in, this command is often abbrevi‐
90 ated as just qe.
91
92 When invoked from vmh, another special feature is enabled: The `topcur'
93 switch directs msh to have the current message “track” the top line of
94 the vmh scan window. Normally, msh has the current message “track” the
95 center of the window (under -notopcur, which is the default).
96
97 msh supports an output redirection facility. Commands may be followed
98 by one of
99
100 ^> file~^write output to file
101 ^>> file~^append output to file
102 ^| command~^pipe output to UNIX command
103
104 If file starts with a “ ” (tilde), then a csh-like expansion takes
105 place. Note that command is interpreted by sh. Also note that msh
106 does NOT support history substitutions, variable substitutions, or
107 alias substitutions.
108
109 When parsing commands to the left of any redirection symbol, msh will
110 honor `\' (back-slash) as the quote next-character symbol, and `“'
111 (double-quote) as quote-word delimiters. All other input tokens are
112 separated by whitespace (spaces and tabs).
113
114
116 $HOME/.mh_profile The user profile
117 /etc/nmh/mts.conf nmh mts configuration file
118
119
121 Path: To determine the user's nmh directory
122 Msg-Protect: To set mode when creating a new `file'
123 fileproc: Program to file messages
124 showproc: Program to show messages
125
126
128 bbc(1)
129
130
132 `file' defaults to “./msgbox”
133 `-prompt (msh) '
134 `-noscan'
135 `-notopcur'
136
137
139 None
140
141
143 The argument to the -prompt switch must be interpreted as a single
144 token by the shell that invokes msh. Therefore, one must usually place
145 the argument to this switch inside double-quotes.
146
147 There is a strict limit of messages per file in packf'd format which
148 msh can handle. Usually, this limit is 1000 messages.
149
150 Please remember that msh is not the C-Shell, and that a lot of the nice
151 facilities provided by the latter are not present in the former.
152
153 In particular, msh does not understand back-quoting, so the only effec‐
154 tive way to use pick inside msh is to always use the -seq select
155 switch. Clever users of nmh will put the line
156
157 pick: -seq select -list
158
159 in their .mh_profile file so that pick works equally well from both the
160 shell and msh.
161
162 sortm always uses -noverbose and if -textfield field is used, -limit 0.
163
164 The msh program inherits most (if not all) of the bugs from the nmh
165 commands it implements.
166
167
168
169MH.6.8 1 Jul 2003 MSH(1)