Go to the previous, next section.

MH basic commands

There are some basic commands that allow you to use MH to read mail:

inc
incorporate
scan
scan messages
show
show current message
prev
previous message
next
next message
rmm
remove message
repl
reply to message
comp
compose message

These are the basic commands that are most often used.

inc
moves mail from your system maildrop into your MH `+inbox' folder, breaking it up into separate files and converting it to MH format as it goes. It prints one line for each message it processes, containing the "From" field, the subject field, and as much of the first line of the message as will fit. It leaves the first message it processes as your current message. You'll need to run inc each time you wish to incorporate new mail into your MH file.

scan
prints a list of the messages in your current folder. It will place a + in front of the current message in the folder. Scan may be passed a list of messages or a range.

show, next, prev
are used to read specific messages from the current folder. show displays the current message, or a specific message, which may be specified by its number, which you pass as an argument to show. next and prev display, respectively, the message numerically after or before the current message. In all cases, the message displayed becomes the current message. If there is no current message, show may be called with an argument, or next may be used to advance to the first message.

rmm
deletes the current message. It may be called with message numbers passed as arguments, to delete specific messages.

repl
is used to respond to the current message (by default). It places you in the editor with a prototype response form. While you're in the editor, you may peruse the item you're responding to by reading the file . After completing your response, you will be prompted by the what now? prompt. By pressing return you will see all of the options available to you, l will "list" your message, s will "send" your message, or p will "push" your message in to the background. Push is the same as send but much faster.

comp
allows you to compose a message by putting you in the editor on a prototype message form, and then lets you send it.

All the MH commands may be run with the single argument: `-help', which causes them to print a list of the arguments they may be invoked with.

Commands which take a message number as an argument (scan, show, repl, ...) also take one of the words: first, prev, cur, next, or last to indicate (respectively) the first, previous, current, next, or last message in the current folder (assuming they are defined).

Commands which take a range of message numbers (rmm, scan, show, ...) also take any of the abbreviations:

num1 - num2
Indicates all messages in the range num1 to num2, inclusive. (the range must be nonempty)
num:+N
Up to N messages beginning with message num.
num:-N
Up to N messages ending with message num.
(num
may be any of the pre-defined symbols: first, prev, cur, next or last)
first:N
The first N messages, if they exist.
prev:N
The previous N messages, if they exist.
next:N
The next N messages, if they exist.
last:N
The last N messages, if they exist.

One of the most useful examples is: scan cur-last

There are many other possibilities such as creating multiple folders for different topics, and automatically refiling messages according to subject, source, destination, or content. For more information please consult the MH manual pages. (man folder, man mh, man refile)

Go to the previous, next section.