]> diplodocus.org Git - nmh/blob - man/whatnow.man
Explictly return the exit code, so we can portably guarantee that
[nmh] / man / whatnow.man
1 .TH WHATNOW %manext1% "January 17, 2014" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 whatnow \- prompting front-end for sending messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B whatnow
11 .RB [ \-draftfolder
12 .IR +folder ]
13 .RB [ \-draftmessage
14 .IR msg ]
15 .RB [ \-nodraftfolder ]
16 .RB [ \-editor
17 .IR editor ]
18 .RB [ \-noedit ]
19 .RB [ \-prompt
20 .IR string ]
21 .RI [ file ]
22 .RB [ \-version ]
23 .RB [ \-help ]
24 .RB [ \-attach
25 .IR header-field-name ]
26 .RB [ \-noattach ]
27 .ad
28 .SH DESCRIPTION
29 .B Whatnow
30 is the default program that queries the user about
31 the disposition of a composed draft. It is normally automatically
32 invoked by one of the
33 .B nmh
34 commands
35 .BR comp ,
36 .BR dist ,
37 .BR forw ,
38 or
39 .B repl
40 after the initial edit.
41 .PP
42 When started, the editor is started on the draft (unless
43 .B \-noedit
44 is given, in which case the initial edit is suppressed). Then,
45 .B whatnow
46 repetitively prompts the user with \*(lqWhat now?\*(rq
47 and awaits a response. The valid responses are:
48 .PP
49 .RS 5
50 .TP \w'refilezzzzfolderz'u
51 .B edit
52 re\-edit using the same editor that was used on the
53 preceding round unless a profile entry
54 \*(lq<lasteditor>\-next: <editor>\*(rq names an alternate editor
55 .TP \w'refilezzzzfolderz'u
56 .B edit <editor>
57 invoke <editor> for further editing
58 .TP \w'refilezzzzfolderz'u
59 .B refile +folder
60 refile the draft into the given folder
61 .TP \w'refilezzzzfolderz'u
62 .B mime
63 process the draft as MIME composition file using
64 the
65 .I buildmimeproc
66 command
67 .RB ( mhbuild
68 by default)
69 .TP \w'refilezzzzfolderz'u
70 .B display
71 list the message being distributed/replied\-to
72 on the terminal
73 .TP \w'refilezzzzfolderz'u
74 .B list
75 list the draft on the terminal
76 .TP \w'refilezzzzfolderz'u
77 .B send
78 send the message
79 .TP \w'refilezzzzfolderz'u
80 .B send \-watch
81 send the message and monitor the delivery process
82 .TP \w'refilezzzzfolderz'u
83 .B push
84 send the message in the background
85 .TP \w'refilezzzzfolderz'u
86 .B whom
87 list the addresses that the message will go to
88 .TP \w'refilezzzzfolderz'u
89 .B whom \-check
90 list the addresses and verify that they are
91 acceptable to the transport service
92 .TP \w'refilezzzzfolderz'u
93 .B quit
94 preserve the draft and exit
95 .TP \w'refilezzzzfolderz'u
96 .B quit \-delete
97 delete the draft and exit
98 .TP \w'refilezzzzfolderz'u
99 .B delete
100 delete the draft and exit
101 .TP \w'refilezzzzfolderz'u
102 .B cd directory
103 use the directory when interpreting attachment file names
104 .TP \w'refilezzzzfolderz'u
105 .B pwd
106 print the working directory for attachment files
107 .TP \w'refilezzzzfolderz'u
108 .B ls [ls-options]
109 list files in the attachment working directory using the ls command
110 .TP \w'refilezzzzfolderz'u
111 .B attach [-v] files
112 add the named files to the message as MIME attachments; -v displays
113 the mhbuild directive that
114 .IR send (1)
115 will use
116 .TP \w'refilezzzzfolderz'u
117 .B alist [-ln]
118 list the MIME attachments, either short, long [-l] or numbered [-n]
119 .TP \w'refilezzzzfolderz'u
120 .B detach [-n] files-or-numbers
121 remove MIME attachments, either by file name or by number with -n
122 .RE
123 .PP
124 When entering your response, you need only type enough characters
125 to uniquely identify the response.
126 .PP
127 For the
128 .B edit
129 response, any valid switch to the editor is valid.
130 .PP
131 For the
132 .B send
133 and
134 .B push
135 responses, any valid switch to
136 .IR send (1)
137 is valid (as
138 .B push
139 merely invokes
140 .B send
141 with the
142 .B \-push
143 option).
144 .PP
145 For the
146 .B whom
147 response, any valid switch to
148 .IR whom (1)
149 is valid.
150 .PP
151 For the
152 .B refile
153 response, any valid switch to the
154 .I fileproc
155 is valid.
156 .PP
157 For the
158 .B display
159 and
160 .B list
161 responses, any valid argument to
162 the
163 .I lproc
164 is valid. If any non\-switch arguments are present, then
165 the pathname of the draft will be excluded from the argument list given
166 to the
167 .I lproc
168 (this is useful for listing another
169 .B nmh
170 message).
171 .PP
172 See
173 .IR mh\-profile (5)
174 for further information about how editors
175 are used by
176 .BR nmh .
177 It also discusses how environment variables can be
178 used to direct
179 .BR whatnow 's
180 actions in complex ways.
181 .PP
182 The
183 .B \-prompt
184 .I string
185 switch sets the prompting string for
186 .BR whatnow .
187 .PP
188 The
189 .B \-draftfolder
190 .I +folder
191 and
192 .B \-draftmessage
193 .I msg
194 switches invoke
195 the
196 .B nmh
197 draft folder facility. This is an advanced (and highly
198 useful) feature. Consult the
199 .IR mh-draft (5)
200 man page for more
201 information.
202 .PP
203 If your
204 .B nmh
205 was configured with readline enabled, you'll be able to use filename
206 completion and other readline features at the prompt. These are
207 particularly useful with the
208 .BR cd ,
209 .BR ls ,
210 .BR attach ,
211 and
212 .B detach
213 commands for managing MIME attachments.
214 .SH FILES
215 .fc ^ ~
216 .nf
217 .ta \w'%etcdir%/ExtraBigFileName 'u
218 ^$HOME/\&.mh\(ruprofile~^The user profile
219 ^<mh\-dir>/draft~^The draft file
220 .fi
221 .SH "PROFILE COMPONENTS"
222 .fc ^ ~
223 .nf
224 .ta 2.4i
225 .ta \w'ExtraBigProfileName 'u
226 ^Path:~^To determine the user's nmh directory
227 ^Draft\-Folder:~^To find the default draft\-folder
228 ^Editor:~^To override the default editor
229 ^<lasteditor>\-next:~^To name an editor to be used after exit
230 ^~^from <lasteditor>
231 ^automimeproc:~^If value is 1, and the draft is a MIME
232 ^~^composition file, then automatically call
233 ^~^buildmimeproc prior to sending.
234 ^buildmimeproc:~^Program to translate MIME composition files
235 ^fileproc:~^Program to refile the message
236 ^lproc:~^Program to list the contents of a message
237 ^sendproc:~^Program to use to send the message
238 ^whomproc:~^Program to determine who a message would go to
239 .fi
240 .SH "SEE ALSO"
241 .IR send (1),
242 .IR whom (1)
243 .SH DEFAULTS
244 .nf
245 .RB ` \-prompt "' defaults to \*(lqWhat\ Now?\ \*(rq"
246 .RB ` \-attach "' defaults to \*(lqNmh-Attachment\*(rq"
247 .fi
248 .SH BUGS
249 If the initial edit fails,
250 .B whatnow
251 deletes your draft (by renaming
252 it with a site-dependent prefix (usually a comma);
253 failure of a later edit preserves the draft.
254 .PP
255 If the
256 .I buildmimeproc
257 fails (returns a nonzero status),
258 .B whatnow
259 simply prints a \*(lqWhat now?\*(rq prompt.
260 .B whatnow
261 depends on the
262 .I buildmimeproc
263 to tell the user that something went wrong.
264 .PP
265 If
266 .I whatnowproc
267 is
268 .BR whatnow ,
269 then
270 .BR comp ,
271 .BR dist ,
272 .BR forw ,
273 and
274 .B repl
275 use a built\-in
276 .BR whatnow ,
277 and do not actually run the
278 .B whatnow
279 program. Hence, if you define your own
280 .IR whatnowproc ,
281 don't call it
282 .B whatnow
283 since it won't be run.
284 .PP
285 If
286 .I sendproc
287 is
288 .BR send ,
289 then
290 .B whatnow
291 uses a built\-in
292 .BR send ,
293 it does not actually run the
294 .B send
295 program. Hence, if
296 you define your own
297 .IR sendproc ,
298 don't call it
299 .B send
300 since
301 .B whatnow
302 won't run it.