whatnow Command
Purpose
Starts a prompting interface for draft disposition.
Syntax
whatnow [ { -draftfolder +folder | -nodraftfolder | file } { -draftmessage message | file } ] [ -editor editor | -noedit ] [ -prompt string ]
Description
The whatnow command provides an interface for the disposition of messages. By default, the interface operates on the current draft message. When you enter the whatnow command, the system places you in the interface and returns the following prompt:
What now?
Within the interface you can manipulate message drafts using the whatnow subcommands. To see a listing of the subcommands, press the Enter key at the What now? prompt. To exit the interface, press q.
If you do not specify the -draftfolder flag or if the Draft-Folder: entry in the $HOME/.mh_profile file is undefined, the whatnow command searches your MH directory for a draft file. Specifying a message after the -draftfolder +folder flag is the same as specifying the -draftmessage flag.
To change the default editor for the whatnow command, use the -editor flag or define the Editor: entry in the UserMhDirectory/.mh_profile file.
Note: The comp, dist, forw, or repl commands use the same interface as the whatnow command.
Flags
Item | Description |
---|---|
-draftfolder +folder | Specifies the folder containing the message. By default, the system uses the UserMhDirectory/draft file. Specifying a message after the -draftfolder +folder is the same as using the -draftmessage flag. |
-draftmessage message | Specifies the draft message. |
-editor editor | Specifies that the value of the editor variable is the initial editor for composing or revising the message. |
-help | Lists the command syntax, available switches (toggles), and
version information. Note: For MH, the name of this flag must be fully spelled out. |
file | User selected draft file. |
message | Specifies the message. Use the following references to specify
messages:
|
whatnow Subcommands
The whatnow subcommands enable you to edit the message, direct the disposition of the message, or end the processing of the whatnow command.
Item | Description |
---|---|
display [flags] | Displays the message being redistributed or replied to. You can specify any flags parameter that is valid for the listing program. (Use the lproc: entry in the $HOME/.mh_profile file to set a default listing program.) If you specify flags that are invalid for the listing program, the whatnow command does not pass the path name of the draft. |
edit [commandstring] | Specifies with the commandstring parameter an editor for the message. You can specify the editor and any valid flags to that editor. If you do not specify an editor, the whatnow command uses the editor specified by the Editor: entry in your UserMhDirectory/.mh_profile file. If your Editor: entry is undefined, the whatnow command starts the editor used in the previous editing session. |
list [flags] | Displays the draft. You can specify any flags parameter that is valid for the listing program. (To specify a default listing program, set a default lproc: entry in the $HOME/.mh_profile file.) If you specify any flags that are invalid for the listing program, the whatnow command does not pass the path name of the draft. |
push [flags] | Sends the message in the background. You can specify any valid flag for the send command. |
quit [-delete] | Ends the whatnow session. If you specify the -delete flag, the whatnow command deletes the draft. Otherwise, the whatnow command stores the draft. |
refile [flags] +folder | Files the draft in the specified folder and supplies a new draft having the previously specified form. You can specify any flags parameter that is valid for the command serving as the fileproc. (You can set a default fileproc: entry in the $HOME/.mh_profile file.) |
send [flags] | Sends the message. You can specify any valid flags for the send command. |
whom [flags] | Displays the addresses to which the message would be sent. You can specify any valid flags for the whom command. |
Profile Entries
The following entries are entered in the UserMhDirectory/.mh_profile file:
Item | Description |
---|---|
Draft-Folder: | Sets the default folder for drafts. |
Editor: | Sets the default editor. |
fileproc: | Specifies the program used to refile messages. |
LastEditor-next: | Specifies the editor used after exiting the editor specified by the LastEditor variable. |
lproc: | Specifies the program used to list the contents of a message. |
Path: | Specifies the UserMhDirectory. |
sendproc: | Specifies the program used to send messages. |
whomproc: | Specifies the program used to determine the users to whom a message would be sent. |
Security
Examples
- To display the original message when you are replying to a message, enter the following at the What now? prompt: The system displays the original message. If you enter the display subcommand from a command other than the dist or repl command, you will receive a system message stating that there is no alternate message to display.
- To edit the draft message
with the vi editor, enter the following at the What now? prompt:
edit vi
- To edit the draft message with the default editor specified in your .mh_profile file, enter the following at the What now? prompt:
- To list the contents of the draft message you have composed, enter the following at the What now? prompt: The draft message you are composing is displayed.
- To send the draft message in the background and get a shell prompt immediately, enter the following at the What now? prompt: The draft message is sent and you immediately receive the shell prompt.
- To quit composing a draft
message and save it to a file so that you can later finish composing
the message, enter the following at the What now? prompt:
The
system responds with a message similar to the following.
In this example, user dale's draft message is saved to the /home/dale/Mail/draft file.whatnow: draft left on /home/dale/Mail/draft
- To quit composing a draft message and delete the message, enter the following at the What now? prompt: The shell prompt is displayed when the draft message is deleted.
- To file the draft message
you are composing before you send it, enter the following at the What now? prompt:
refile +tmpThe system responds with a message similar to the following:
In this example, if you answer yes, the draft message is filed in user dale's folder tmp.Create folder "home/dale/Mail/tmp"?
- To send the draft message you have composed, enter the following at the What now? prompt: The shell prompt is displayed when the message is sent.
- To verify that all addresses
in the draft message are recognized by the mail delivery system, enter
the following at the What now? prompt:
The
system responds with a message similar to the following:
In this example, the mail delivery system recognized dale@venus as a correct address, but did not recognize jeanne as a correct address.jeanne... User unknown dale@venus... deliverable
Files
Item | Description |
---|---|
$HOME/.mh_profile | Specifies the MH user profile. |
UserMhDirectory/draft | Contains the current message draft. |
/usr/bin/whatnow | Contains the whatnow command. |