[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]
AIX Version 4.3 Commands Reference, Volume 1
comp Command
Purpose
Composes a message.
comp [ +Folder ] [ -draftfolder +Folder | -nodraftfolder Folder ] [ Message | -draftmessage Message ] [ -file File ] [ -editor Editor | -noedit ] [ -form FormFile ] [ -use | -nouse ] [ -nowhatnowproc | -whatnowproc Program ]
Description
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.
Flags
-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:
- 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. 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. |
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 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. |
Examples
- To compose a new message, enter:
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.
- To compose a new message using the vi editor, enter:
comp -editor vi
- To compose a message using message 8 in the schedules folder, enter:
comp +schedules 8 -use
- To compose a message using a message draft in the /home/mike/parts file, enter:
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.
Files
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. |
Related Information
The ali command, dist command, forw command, refile command, repl command, send command, whatnow command, whom command.
The mh_alias file format, mh_profile file format.
Mail Overview in AIX Version 4.3 System User's Guide: Communications and Networks.
Peek, Jerry. MH and xmh: E-mail for Users and Programmers. Sebastopol, CA: O'Reilly & Associates, 1992.
[ Previous |
Next |
Contents
| Glossary
| Home
| Search ]