Composes a message.
comp [ +Folder ] [ -draftfolder +Folder | -nodraftfolder Folder ] [ Message | -draftmessage Message ] [ -file File ] [ -editor Editor | -noedit ] [ -form FormFile ] [ -use | -nouse ] [ -nowhatnowproc | -whatnowproc Program ]
The comp command starts an editor that assists you in creating and modifying messages. The comp command provides a header template, the /etc/mh/components file. By default, the specified editor creates a UserMhDirectory/draft file. If a draft file already exists, the comp command prompts you for permission to replace or use the existing file. To edit an existing draft file without being prompted for permission, specify the -use flag.
Once started, the editor prompts you to enter values for each of the message header fields. The comp command uses the definitions in the UserMhDirectory/components file for the header fields. If the file does not exist, the /etc/mh/components file is used. You can use the -form or +Folder flag to specify an alternative header format.
To exit the editor, use the Ctrl-D sequence. When you exit the editor, the comp command responds with a What now? prompt. From this prompt, you can specify any of the whatnow subcommands. To see a list of the available subcommands, press Enter. You can use the subcommands to continue composing the message, direct the disposition of the message, or end the processing of the comp command.
Note: A line of dashes or a blank line must be left between the header and the body of the message for the message to be identified when it is sent.
The -file, -draftfolder, and -draftmessage flags are used to specify existing draft messages. If the -draftfolder +Folder flag is followed by a Message parameter, it is the same as specifying the -draftmessage flag. If you wish, you can define a default Draft-Folder: entry in your Message Handler (MH) $HOME/.mh_profile file.
Item | Description |
---|---|
-draftfolder +Folder | Identifies the folder containing the draft message. If a message is not specified with this flag, the default message is new. |
-draftmessage Message | Identifies the draft message. Specifying a Message variable after the -draftfolder +Folder flag is the same as specifying the -draftmessage flag. |
-editor Editor | Specifies the initial editor for composing the message. If you do not specify the -editor flag, the comp command selects the default editor specified by the Editor: entry in your $HOME/.mh_profile file. |
-file File | Places the draft message in the specified file. If you do not specify the absolute path name for the File variable, the comp command places the file in the user's MH directory. If a file is specified, the comp command prompts you for the disposition of the draft. |
+Folder Message | Uses the header information from a file in the specified folder. If you specify a folder but no message, the comp command uses the current message as the default. |
-form FormFile | Uses the header fields specified by the FormFile variable. The comp command treats each line in FormFile as a format string. |
-help | Lists the command syntax, available switches (toggles), and
version information. Note: For MH, the name of this flag must be fully spelled out. |
Message | Specifies a message. Use the following references to specify
a message:
|
-nodraftfolder | Places the draft in the UserMhDirectory/draft file. This is the default. |
-noedit | Suppresses the initial edit. When you specify this flag, you receive the What now? prompt. |
-nouse | Creates a new message. |
-nowhatnowproc | Prevents interaction with the editor and the What now? prompt. |
-use | Continues composing an existing draft of a message. |
-whatnowproc Program | Starts the specified program to guide you through the composing tasks. If you specify the whatnow command as the value for the Program variable, the comp command starts an internal whatnow procedure, instead of a program with the file name whatnow. |
Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
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 initial editor. |
fileproc: | Specifies the program used to refile messages. |
Msg-Protect: | Sets the protection level for the new message files. |
Path: | Specifies a user's MH directory. |
whatnowproc: | Specifies the program used to prompt What now? questions. |
comp
The system prompts you to enter the information
for the message fields. To bypass a field, press the Enter key. When
the header information is complete, enter the text for the body of
the message. To finish composing a message and exit the editor, press the Ctrl-D sequence. The following prompt is displayed on your screen:
What now?
Pressing the Enter key displays a list of the whatnow subcommands. If you want to send the message,
enter the send subcommand after the What now? prompt.comp -editor vi
comp -file /home/mike/parts
The system prompts you for the disposition of the file. Press the Enter key for a list of options. Select the appropriate option.Item | Description |
---|---|
UserMhDirectory/components | Specifies the user's default message format. (If it exists, it overrides the system default message format.) |
UserMhDirectory/draft | Contains the current draft message. |
$HOME/.mh_profile | Specifies the user's MH profile. |
/etc/mh/components | Identifies the system default message format. |
/usr/bin/comp | Contains the comp command. |