1WHATNOW(1) General Commands Manual WHATNOW(1)
2
3
4
6 whatnow - prompting front-end for writing nmh messages
7
9 whatnow [-help] [-version] [-draftfolder +folder] [-draftmessage msg]
10 [-nodraftfolder] [-editor editor] [-noedit] [-prompt string]
11 [file]
12
14 whatnow is the default program that queries the user about the disposi‐
15 tion of a composed draft. It is normally automatically invoked by one
16 of the nmh commands comp, dist, forw, or repl after the initial edit.
17
18 When started, the editor is started on the draft (unless -noedit is
19 given, in which case the initial edit is suppressed). Then, whatnow
20 repetitively prompts the user with “What now?” and awaits a response.
21 The valid responses are:
22
23 edit Re-edit using the same editor that was used on the preced‐
24 ing round unless a profile entry “<lasteditor>-next: <edi‐
25 tor>” names an alternate editor.
26
27 edit editor
28 Invoke editor for further editing.
29
30 refile +folder
31 Refile the draft into folder .
32
33 mime Process the draft as a MIME composition file using the
34 buildmimeproc command which defaults to mhbuild(1).
35
36 display
37 List the message being replied to or distributed on the
38 terminal.
39
40 list List the draft on the terminal.
41
42 send Send the message.
43
44 send -watch
45 Send the message and monitor the delivery process.
46
47 push Send the message in the background.
48
49 whom List the addresses to whom the message will go.
50
51 whom -check
52 List the addresses and verify that they are acceptable to
53 the transport service.
54
55 quit Preserve the draft and exit.
56
57 quit -delete
58 Delete the draft and exit.
59
60 delete Delete the draft and exit.
61
62 cd directory
63 Use directory when interpreting attachment file names.
64 This does not change whatnow's process's current working
65 directory so it and child processes, e.g. edit's, do not
66 see the change.
67
68 pwd Print the working directory for attachment files.
69
70 ls [ls-options]
71 List files in the attachment working directory using ls(1).
72
73 attach [-v] files
74 Add the named files to the message as MIME attachments; -v
75 displays the mhbuild(1) directive that send(1) will use.
76
77 alist [-ln]
78 List the MIME attachments' filenames. -l gives a long
79 listing showing their full path. -n numbers them for use
80 with detach .
81
82 detach [-n] files-or-numbers
83 Remove MIME attachments, either by file name or by number
84 with -n.
85
86 When entering your response, you need only type enough characters to
87 uniquely identify the response.
88
89 For the edit response, any valid switch to the editor is valid.
90
91 For the send and push responses, any valid switch to send(1) is valid
92 (as push merely invokes send with the -push option).
93
94 For the whom response, any valid switch to whom(1) is valid.
95
96 For the refile response, any valid switch to the fileproc is valid.
97
98 For the display and list responses, any valid argument to the lproc is
99 valid. If any non-switch arguments are present, then the pathname of
100 the draft will be excluded from the argument list given to the lproc
101 (this is useful for listing another nmh message).
102
103 See mh-profile(5) for further information about how editors are used by
104 nmh. It also discusses how environment variables can be used to direct
105 whatnow's actions in complex ways.
106
107 The -prompt string switch sets the prompting string for whatnow.
108
109 The -draftfolder +folder and -draftmessage msg switches invoke the nmh
110 draft folder facility. This is an advanced (and highly useful) fea‐
111 ture. Consult mh-draft(5) for more information.
112
113 If your nmh was configured with readline enabled, you'll be able to use
114 filename completion and other readline features at the prompt. These
115 are particularly useful with the cd, ls, attach, and detach commands
116 for managing MIME attachments.
117
119 $HOME/.mh_profile The user profile
120 <mh-dir>/draft The draft file
121
123 Path: To determine the user's nmh directory
124 Draft-Folder: To specify the default draftfolder
125 Editor: To override the default editor
126 <lasteditor>-next: To name an editor to be used after exit
127 from <lasteditor>
128 buildmimeproc: Program to translate MIME composition files
129 fileproc: Program to refile the message
130 lproc: Program to list the contents of a message
131 sendproc: Program to use to send the message
132 whomproc: Program to determine who a message would go to
133
135 mh-draft(5), send(1), whom(1)
136
138 `-prompt' defaults to “What Now? ”
139
141 If the initial edit fails, whatnow deletes your draft (by renaming it
142 with a site-dependent prefix (usually a comma); failure of a later edit
143 preserves the draft.
144
145 If the buildmimeproc fails (returns a nonzero status), whatnow simply
146 prints a “What now?” prompt. whatnow depends on the buildmimeproc to
147 tell the user that something went wrong.
148
149 If whatnowproc is whatnow, then comp, dist, forw, and repl use a built-
150 in whatnow, and do not actually run the whatnow program. Hence, if you
151 define your own whatnowproc, don't call it whatnow since it won't be
152 run.
153
154 If sendproc is send, then whatnow uses a built-in send, it does not ac‐
155 tually run the send program. Hence, if you define your own sendproc,
156 don't call it send since whatnow won't run it.
157
158
159
160nmh-1.8 2022-12-22 WHATNOW(1)