[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 6


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


-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:

Number
Number of the message.

cur or . (period)
Current message. This is the default.

first
First message in a folder.

last
Last message in a folder.

next
Message following the current message.

prev
Message preceding the current message.

-nodraftfolder
Places the draft in the UserMhDirectory/draft file.

-noedit
Suppresses the initial edit.

-prompt String
Uses the specified string as the prompt. The default string is What now?.

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.

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:

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.

Examples

  1. To display the original message when you are replying to a message, enter the following at the What now? prompt:
    display
    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.
  2. To edit the draft message with the vi editor, enter the following at the What now? prompt:
    edit vi
  3. To edit the draft message with the default editor specified in your .mh_profile file, enter the following at the What now? prompt:
    edit
  4. To list the contents of the draft message you have composed, enter the following at the What now? prompt:
    list
    The draft message you are composing is displayed.
  5. To send the draft message in the background and get a shell prompt immediately, enter the following at the What now? prompt:
    push
    The draft message is sent and you immediately receive the shell prompt.
  6. 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:
    quit
    The system responds with a message similar to the following.

    whatnow: draft left on /home/dale/Mail/draft
    

    In this example, user dale's draft message is saved to the /home/dale/Mail/draft file.

  7. To quit composing a draft message and delete the message, enter the following at the What now? prompt:
    quit -delete
    The shell prompt is displayed when the draft message is deleted.
  8. To file the draft message you are composing before you send it, enter the following at the What now? prompt:
    refile +tmp
    The system responds with a message similar to the following:

    Create folder "home/dale/Mail/tmp"?
    

    In this example, if you answer yes, the draft message is filed in user dale's folder tmp.

  9. To send the draft message you have composed, enter the following at the What now? prompt:
    send
    The shell prompt is displayed when the message is sent.
  10. To verify that all addresses in the draft message are recognized by the mail delivery system, enter the following at the What now? prompt:
    whom
    The system responds with a message similar to the following:

    jeanne... User unknown
    dale@venus... deliverable
    

    In this example, the mail delivery system recognized dale@venus as a correct address, but did not recognize jeanne as a correct address.

Files


$HOME/.mh_profile Specifies the MH user profile.
UserMhDirectory/draft Contains the current message draft.
/usr/bin/whatnow Contains the whatnow command.

Related Information

The comp command, dist command, forw command, prompter command, refile command, repl command, rmm command, scan command, send command, whom command.

The mh_alias file format, mh_profile file format.

Mail Overview in AIX 5L Version 5.1 System User's Guide: Communications and Networks.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]