Columbia MM
MM Manual

USING THE COMMAND LINE EFFECTIVELY

You can make use of several special features to help you type the command line in MM. Most of them are the result of including the CCMD package into MM; CCMD was created at Columbia University to make it easier to type commands.


COMMAND RECOGNITION: USE PARTIAL COMMANDS

You can type most MM commands with only one or two letters. For example, at the MM> prompt, r is completed as read, while at the R> prompt, r is completed as reply. Likewise, headers all can be typed as h a, and at the R> prompt reply all including can be typed as r a i.

Default message sequences are added automatically. At the MM> prompt for example, r actually does read unseen.


COMMAND AND FILENAME COMPLETION: USE THE TAB KEY

You can type a partial command or filename and then press the TAB or ESC key to see the completion on screen.

For example, at MM>, type r and then press TAB to see it completed as read (messages). In command completion, anything in parentheses is a suggestion; in this case, it tells you you might want to specify what messages to read. If you then press TAB again, you see unseen, the automatic completion (default) for read. The main reason to use command completion is to get information from MM: to see how it interprets a partially-typed command, or to see what you could type after the command (shown by the suggestion in parentheses). You do not need to use command completion just to give the command, since MM understands partially typed commands.

When you use MM to access an existing file, use completion to avoid typing the full filename. You might be using get or examine to see another mail file, or move or copy to write to another mail file, or using control-b to insert a file into a message, among other things. Type enough of the filename to identify it and then press TAB or ESC to fill in the rest. If it can't find a unique file, it beeps at you. Type ? to see the possible files.

You can also use completion on your own mail-aliases, names of MM variables (with the set or show commands), and your keywords. Try it. It saves lots of typing.


COMMAND HISTORY: AVOID RETYPING ENTIRE COMMANDS

MM remembers commands you have given during the current session (up to a limit), and you can use the history to avoid retyping the same commands.

Control-p displays the previous command. Press control-p until you get back to the command you want to repeat. If you go back too far, control-n moves forward again to the next command.

Following is a simple example. You check headers from howie, looking for a certain old message, and then read 4 thinking message 4 is the one you want. However, message 4 is the wrong one, and by now the headers display has moved off the screen. By using control-p twice, you can get back to the h from howie command, and do it again, using two keystrokes instead of retyping the whole thing.



MM>h from howie
 [message headers are shown]
MM>r 4
 [message 4 is shown]
MM>[control-p]
MM>r 4
MM>[control-p]
MM>h from howie [return]
 [message headers are shown, again]


History is more valuable if the original command is longer, especially if you don't even remember exactly what it was.

In some instances you may be able to use the message-sequence previous-sequence, which can be abbreviated down to just p. One common use would be to use headers on a long message sequence (headers from mel before mon text fish), and then, if correct, read the messages with just r p (read previous-sequence). If the message-sequence you want is not the very last one you used, you need to use command history, or just retype it.


COMMAND-LINE EDITING: AVOID RETYPING PARTS OF COMMANDS

You can edit the command line by using a set of control characters similar to Emacs. If you know the control characters, editing may be faster and less work than retyping a command when you want to change it slightly.




control-b, control-f    move cursor back 1 character, forward 1 character
control-a, control-e    move cursor to beginning of line, to end of line
backspace, control-d    delete character before cursor, character at cursor
control-w    delete word or part of word to the left of the cursor
control-k, control-u    delete from cursor to end of line, delete entire line
control-t    transpose character at cursor with the one before it


There is no special command to insert characters; they are simply inserted wherever the cursor is. When the command is correct, just press return, regardless of where the cursor is in the line.

Use command history when you need to type a long command similar to a recent command. Use control-p to get back a recent command, and then edit it to what you want to do now.


[ Columbia MM Manual ]