home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-04-12 | 37.2 KB | 1,201 lines |
- See the COMMANDS heading below for more detail.
- .PP
- This shell-like quality is for the convenience of the user and is not
- intended to replace the functionality of
- .IR sh ,
- .IR csh ,
- or any other command interpreter.
- .SH "CURSES INTERFACE"
- The curses interface utilizes the curses routines intrinsic to most
- UNIX systems these days.
- This interface is screen oriented rather
- than line oriented and allows the user to access commands and messages
- more quickly at the cost of history, piping, and a few commands.
- .PP
- Many users who prefer the curses interface might want to always start
- all their mail sessions in the curses interface.
- Putting the curses
- command in your initialization file is a no-no, so you can alias your
- login shell mail command to include the -C option.
- If you use the Bourne Shell, you're going to have to type it out all the time.
- Mush will to attempt to know not to run a shell if you're just sending mail to
- someone, so the
- .I csh
- command line sequences:
- .sp
- .ti +2
- % alias mail 'mush -C'
- .ti +2
- % mail fred
- .sp
- will mail to fred and not enter the shell.
- However, if you just said, "mail"
- with no arguments, you'll enter the shell in curses mode if you have mail.
- If you don't, you'll be told so, and the shell will not start.
- If you want to enter curses mode even if
- you don't have mail, use the \-S option on the command line.
- .PP
- In curses mode, the user's terminal has it's \*Qecho\*U turned off so commands
- that are issued are not echoed on the screen.
- Certain commands cause the mode
- to return to normal for typing purposes (sending mail, for example).
- In normal operation, the screen will display the current set of message
- headers, the current message number is in the top left corner, the
- mail status on the top line, and the cursor will be placed on the current
- message.
- The number of message headers displayed is set by the variable
- .BR screen .
- If the user does not have that variable set, the baud rate is checked and
- the size of the screen is set according to optimal refresh time.
- Usually, 300 baud gives 7 lines, 1200 gives 14, 2400 gives 22 lines, and all
- higher baud rates give the size of the screen, whatever that may be.
- Note that the top line is reserved for \*Qstatus\*U and the bottom line is
- for user interaction should it be required.
- .PP
- The user may now type commands via key sequences which are not echoed
- to the screen.
- Thus, function keys may be bound to \*Qcommands\*U by using the
- .B bind
- command.
- A list of key-to-command bindings can be found at runtime by typing `?'
- in curses mode or by using the
- .B bind
- command in line mode.
- .PP
- The commands to which you can map sequences are intended to be as self
- explanatory as possible, but admittedly, it's easier to figure out via
- trial and error than to try to wade through this documentation.
- A list of the legal curses commands can be obtained when executing the
- bind command.
- Regular tty line-mode commands are not issued from
- the curses interface; only special curses mode commands are understood.
- The current list of valid curses commands is:
- .sp
- .ta 1.5i 3i 4.5i
- .in +4
- .nf
- alias back msg bind bottom page
- chdir copy copy list delete
- delete list display display next exit
- exit! first msg folder goto msg
- ignore last msg line mode lpr
- mail mail flags my hdrs next msg
- preserve quit quit! redraw
- reply reply all reverse video save
- save list saveopts screen back screen next
- search cont search down search up shell escape
- show hdr sort sort reverse source
- top top page unbind undelete
- undelete list update variable version
- write write list help
- .fi
- .in -4
- .sp
- .PP
- The following is a list of default key-command bindings.
- If you specify bind commands in your initialization file that conflict with
- these defaults, your settings will override the defaults.
- The default settings given here
- use the ^-character method to indicate control characters.
- Thus, `^X' would mean control-X even
- though you'd have to type \*Q\\CX\*U to set
- the binding and actually use the control key and the `X' key simultaneously
- to really
- .I do
- a Control-X.
- This is mostly because nroff makes printing the backslash
- character so amazingly difficult.
- .TP
- \&., t, p, T=top, n=next
- Display (type/print) message.
- Top will display the first
- .B crt
- lines of a message.
- Next will print the next message.
- If the current message is deleted, the next undeleted message is found.
- You might notice this is different than the line mode, which will return
- an error message that the current message is marked as deleted.
- .TP
- +, j, J, RETURN
- Go to next message.
- .TP
- -, k, K, ^K
- Go to previous message.
- .TP
- ^, $
- Go to first/last message.
- .TP
- {, }
- Go to top/bottom of screen.
- .TP
- a
- Set aliases.
- .TP
- b, B
- Set/unset bindings.
- .TP
- d, D, u, U
- Delete/undelete messages (capitals prompt for message list).
- .TP
- f
- Change folder.
- If current folder has changed, verification for update will be requested.
- .TP
- g, 0-9
- Go directly to a specified message.
- When the \*Qgoto\*U command
- is selected, a prompt at the bottom of the window prompts for a
- .BR "message list" .
- Anything which describes a message list may be used.
- Since
- .I Mush
- commands return message lists, a legal
- .I Mush
- command enclosed in backquotes may be used to go to a particular message.
- The new current message pointer will point to the next
- message, returned by the command, that is below the old current message.
- An example:
- .sp
- .ti +2
- goto msg: `pick -f argv`
- .sp
- This will cause the current message to move to the first message
- in the current folder from the user \*Qargv\*U that comes after the
- message pointed to when the \*Qgoto\*U was issued.
- So, if messages 1 and 5
- are from the user \*Qargv\*U and the current message the user was on
- was message 3, then the new current message would be message 5, since it
- is the first message found after message 3 that is from \*Qargv\*U.
- .TP
- h
- Set personal headers.
- .TP
- H
- Print header information for the current message.
- This only works when the user is provided with the \*Q...continue...\*U
- prompt and he wishes to view the current message header instead of
- redrawing the entire screen.
- .TP
- i
- Set ignored headers.
- .TP
- m, M
- Send mail (capital prompts for mail flags).
- .TP
- o, O
- Order messages (sort; capital reverses order).
- A prompt requests the sort constraints.
- .TP
- q, Q, x, X
- Quit/exit.
- \&`q' will test to see if the current folder has been updated and prompt
- the user to verify updating.
- \&`x' does not update mail, but quits the program.
- \&`Q' does not prompt for update verification; if changes were
- made, updating is automatic.
- \&`Q' (quit!) and `X' (exit!) will work even when typed at the
- \*Q...continue...\*U prompt, whereas `q' and `x' will not.
- .TP
- r, R
- Reply/reply all.
- .TP
- s, S, c, C, w, W
- Save, copy, or write messages (capitals prompt for message lists).
- .TP
- v
- Set regular variables (as opposed to environment variables).
- .TP
- V
- Print version number.
- .TP
- z, Z
- Print next/previous screenful of message headers.
- .TP
- ^L
- Redraw the screen.
- .TP
- ^P
- Preserve current message (toggle).
- .TP
- ^U
- Update folder.
- A prompt will request confirmation.
- .TP
- ^R
- Toggle reverse video mode (current message is in reverse video).
- .TP
- |
- Send message to printer
- .TP
- !
- Shell Escape.
- Prompts for command; RETURN invokes a shell.
- .TP
- %
- change directory.
- .TP
- (, )
- Source/saveopts.
- Prompts for file name.
- .TP
- /, ^/, ^N
- Forward, backward, continue search for patterns.
- Entire messages are not searched for here.
- Only the text available on the screen is searched for.
- Note that some terminals use `^_' (control-underscore) for `^/',
- so you may wish to re-bind this key.
- .TP
- :[cmd]
- Enter line mode for one command.
- If no command is given, curses mode
- is exited and the session continues in line mode.
- .PP
- When setting new key sequences to be bound to commands, the user may
- use control keys and the ESCAPE character for extended commands.
- Exceptions are control-C, control-\\, and possibly other control characters
- depending on your system's configuration or your current tty interrupt
- character settings.
- The spacebar may not be bound using the interface
- supplied by the curses mode `b'
- .RB ( bind )
- command since spaces are stripped before processing.
- To bind the spacebar to a function, use the line mode command
- .sp
- .ti +2
- bind " " display next
- .sp
- This example shows how you can bind the spacebar to display the next message.
- This command may be given in the initialization file or on a
- .I Mush
- command line.
- .PP
- When assigning key sequences to commands, the user enters the
- .B bind
- command and prompting is done.
- If the
- user wishes to have control characters or the escape character in a key
- sequence while still using ascii format, the special notation for control
- characters is provided.
- This sequence is used primarily for the use of
- binding control character sequences in the initialization file.
- This format
- is also used to display the current key-command mappings by the program.
- .PP
- To specify control characters in ascii format for the bind command, the
- sequence \*Q\\Cc\*U is used where `c' is the
- character which the control key will translate to and must be in upper case.
- The sequence \*Q\\CP\*U would map to control-P.
- If the user wishes to indicate the RETURN key, this is specified
- with the string \*Q\\n\*U and
- the tab key is specified by the string \*Q\\t\*U.
- As a more complex example, on a Wyse-50 terminal, the 8th function key
- outputs the three characters: control-A, H, line-feed.
- To map this function key to a command, the
- user would have to enter the sequence \*Q\\CAH\\n\*U as the key sequence,
- then follow up with a valid curses command.
- From then on, if the user presses that function key,
- then the command mapped to it will be executed.
- .PP
- The ESCAPE key is signified by the sequence, \*Q\\E\*U.
- On a Sun-3 workstation,
- the R1 key outputs the character sequence: ESC, [, 2, 0, 8, z.
- The corresponding
- .B bind
- key sequence would be \*Q\\E[208z\*U.
- Restrictions are that key sequences may not contain the space character
- unless bound in line mode, and can never begin with a digit.
- .PP
- Whenever a command is entered, other than `^L'
- .RB ( redraw ),
- that causes the screen to scroll or be refreshed in any way,
- .I Mush
- is left in the
- .I continue
- mode.
- When in this mode, the user is given his line-mode prompt followed
- by \*Q...continue...\*U indicating that he may issue a new command or
- return to the top level where the current message headers are displayed
- on the screen.
- Remember that this is still the curses mode, but much time
- is saved by avoiding redrawing the screen after each command.
- The user may move up and down messages using the appropriate commands
- (j/k by default) or anything else the curses mode allows.
- Only the spacebar and the exit and quit commands will return
- to the top level.
- Because the exit and quit commands are used to do this, there are 2 additional
- ways to \*Qquit\*U from curses mode and return to the login shell.
- The \*Qexit\*U and \*Qquit\*U commands will quit from the top level, but
- the commands
- .B exit!
- and
- .B quit!
- are used to exit from the \*Qcontinue\*U level in the curses interface as well
- as from the top level.
- .PP
- Note that the best way to understand the curses interface is to just use it.
- In line mode, the command \*Qcurses\*U puts you into curses mode.
- .SH "GRAPHICS INTERFACE"
- When running the window-based graphics interface, there will be 5
- windows displaying panels of commands, message headers and a text
- window which is used for displaying messages or writing messages
- to send to other users.
- .PP
- The panel items have labels describing their functionality.
- Selecting
- a panel item with the LEFT mouse button causes the action to be executed.
- The RIGHT mouse button displays a menu of options that the command may
- branch to.
- For example, the
- .B save
- panel item by default will save messages to the file "mbox", but if the
- RIGHT mouse button causes a menu to be displayed the choices of where
- to save the message increases to include the items in the menu.
- These typically include the files in the user's folder directory (see the
- .B folder
- variable below).
- .PP
- At the end of each list of menu entries for panel items is an item
- labelled \*Qhelp\*U.
- When this item is chosen, help with that command
- is displayed in the center of the console.
- .PP
- When composing letters, the interface is the same for the tool mode,
- the line mode and the curses mode.
- Tilde escapes are recognized by all
- the interfaces, but the tool interface allows the user to use the menu
- mouse button to select the tilde escape desired.
- .PP
- If the user wishes to review a mail message while in edit-mode, he may
- do as the other interfaces and enter the tilde escape command \*Q~:print\*U.
- This will cause the current message (or the numbered message, if given) to
- be displayed in the window.
- Editing is temporarily put on hold till the user
- enters a `q' in the message window to indicate that he is done reading the
- message and input is to be directed again to the letter being composed.
- .SH COMMANDS
- Described below are legal commands understood by
- .I Mush
- that you can type at the line mode prompt.
- Most commands have abbreviations
- (given in parentheses) and can be followed by message lists.
- In most cases,
- whitespace is not necessary to separate commands from message lists.
- For example, \*Qd*\*U will delete all messages, and \*Qu1-7 {4}\*U will
- undelete messages 1 through 7 except for message number 4.
- .PP
- The ability to customize commands using the
- .B cmd
- facility allows users to customize
- .I Mush
- to resemble other mailers.
- However, efforts have already been made to include commands which are backwards
- compatible with other line-mode mailers.
- Users of the graphics tool mode of
- .I Mush
- may have little need for the command line mode because the icon based
- interface allows interaction with many commands.
- The graphics mode is much more restrictive in favor of user
- friendliness but most useful commands may be achieved anyway.
- .PP
- The following is a list of all recognized commands.
- .TP
- .B alternates
- .RB ( alts )
- This command
- is useful if you have accounts on several machines.
- It can be used to inform
- .I Mush
- that the listed addresses are really you.
- When you
- .B reply
- to messages,
- .I Mush
- will not send a copy of the message to any of the addresses
- listed on the
- .B alternates
- list.
- If the
- .B alternates
- command is given with no argument, the current set of alternate
- names is displayed.
- .TP
- .B cd
- Change the working directory to that specified, if given.
- If no directory is given, then changes to the user's home directory.
- .TP
- .BR cmd / uncmd
- Command line aliases are set and unset using these commands.
- More extensive information is given in the LINE-MODE INTERFACE section.
- .B Uncmd
- may take `*' as an argument to uncmd everything set.
- .TP
- .BR debug " [N]"
- Set debugging level to N (1 by default).
- When in debug mode, the user can see some of the flow of
- control the program makes while executing.
- The intent of the debug level is for tracking down
- bugs with the program at specific locations.
- Periodically, the program may segmentation fault and core dump.
- When this happens, the user can reenter the program,
- set the debugging level and recreate the problem.
- .sp
- If the user suspects memory allocation problems, a debugging
- level of 2 or higher will prevent memory from being freed causing no
- overwriting of memory bounds.
- .sp
- If the user suspects sendmail errors,
- a debugging level of 3 or higher will prevent sendmail from starting
- and outgoing mail is sent to the standard output instead of actually
- being sent.
- .TP
- .BR delete / undelete
- .RB ( d / u )
- Takes a message list as argument and marks them all as deleted.
- Deleted messages will not be saved in
- .IR mbox ,
- nor will they be available for most other commands.
- If the folder has not been updated, deleted messages can be recovered
- with
- .BR undelete .
- .TP
- .B dt
- Deletes the current message and prints the next message.
- .TP
- .B echo
- Echoes all the arguments given on the command line, expanding variables
- and history references.
- .TP
- .B exit
- .RB ( x )
- Effects an immediate return to the login shell without
- modifying the current folder or system spool directory.
- .TP
- .B expand
- Aliases, given as arguments, are expanded as they would be if you
- were to send mail to each.
- .TP
- .BR fkey / unfkey
- Prints the values of the function keys.
- The function keys are used in
- the graphics tool mode only.
- You can set the values of function keys explicitly using the
- .B fkey
- command, but the whole process is automated by using the function key
- interface provided by the graphics mode.
- By default, the last key in each function key pad displays
- the values of all the function keys in that set of function keys.
- There are the left, right and top set of keys.
- .TP
- .BR folder " [\-N] [\-r] [!] [ %[user] | # | & | file ]"
- .RB ( fo )
- Change current folder.
- With no arguments, prints the name of the current folder.
- The arguments are:
- .nf
- .ta 1i
- .in +2
- \-N No headers are displayed upon entering new folder
- \-r Set Read-Only mode (can't alter new folder)
- ! If specified, the current folder is not updated
- %[user] Change to /usr/spool/mail/[user] (default is yours)
- # Switch back to the previous folder
- & Change folder to $mbox (default is ~/mbox)
- .in -2
- .fi
- .TP
- .B folders
- List the names of the folders in your folder directory.
- Your folder directory is the directory
- .I Mail
- in your home directory.
- Or, you can set the variable
- .B folder
- to specify another folder directory.
- .br
- .TP
- .BR from " [ + | \- ]"
- .RB ( f )
- With no arguments, from will print the current message's header.
- If given a message list, from will print the headers of those
- messages which are in the list.
- .sp
- The special arguments `\-' and `+' can be given to move the
- current message pointer to the previous or next message
- respectively while also printing that message's header.
- If a message list was given in addition to `\-' or `+', then
- the current message pointer will be set to the first or last
- message, respectively, in the message list given.
- Examples:
- .sp
- .ti +2
- pick \-f Dan | from +
- .sp
- will print the headers of all messages that contain Dan in
- in the author's name and set the current message pointer to
- the last one of that kind in the list.
- .sp
- .ti +2
- from \- 10-30 {16}
- .sp
- will print the headers of messages 10 through 30 except for
- message 16 and set the current message pointer to 10.
- .sp
- .ti +2
- from +
- .sp
- will print the header of the message after the current message
- and increment the current message pointer to the next message.
- .sp
- .ti +2
- from $
- .sp
- will print the last message's header and not move the current
- message pointer.
- .TP
- .BR headers " [ \-H[:c] ] [ + | \- ]"
- .RB ( h ,
- .BR z )
- Prints a screenful of message headers listed in the
- current folder.
- If a message number is given on the command line,
- the first message of the screenful of messages will be
- that message number.
- The `z' command is identical to the \*Qh +\*U
- command and remains for compatibility reasons.
- The variable
- .B screen
- may be set to tell how many headers are in a screenful.
- In the graphics tool mode, the variable
- .B screen_win
- contains the number of headers used in the headers subwindow.
- .sp
- A typical header may look like:
- .sp
- .ti +2
- 5 >N argv@spam.istc.sri.com Feb 19, (10/278) Test
- .sp
- This line indicates that it is message number 5 and the
- .I >
- indicates that the \*Qcurrent message pointer\*U is pointing to this
- message.
- The next two positions indicate the message status.
- The first
- may be one of, \*QN\*U (new and unread), \*QU\*U (old, but still
- unread), \*Q*\*U (deleted), \*QO\*U (old and read), \*QP\*U (preserved),
- or \*Q \*U (read).
- The second position may have an \*Qr\*U if the message
- has been replied to.
- .sp
- The author of the example message header is
- .IR argv@spam.istc.sri.com ,
- the date is
- .IR "Feb 19" ,
- the number of lines in the message is
- .IR 10 ,
- the number of characters is
- .I 278
- and the subject of the message is
- .IR Test .
- The format of the message header exemplified here is described by
- the string variable
- .BR hdr_format .
- The example given above has a hdr_format of
- .sp
- .ti +2
- set hdr_format = "%25f %7d (%l/%c) %25s"
- .sp
- See the description of
- .B hdr_format
- in the VARIABLES section for more information on header formats.
- .sp
- You can print a special subset of message headers by using the
- .I \-H:c
- option, where `c' is one of:
- .nf
- .in +2
- .ta 1i
- n new messages
- d deleted messages
- u unread messages
- o old messages
- r replied to messages
- a all messages
- .fi
- .in -2
- .sp
- More options to the
- .B headers
- command include
- .RI ` + '
- and
- .RI ` \- '.
- Each will print the next or previous screenful of message headers.
- The
- .B z
- command can also be used; `z' alone will print the next
- screenful (thus, the `+' is optional),
- and \*Qz \-\*U is equivalent to \*Qh \-\*U.
- .sp
- Headers affects all the messages it displays, so piping may be done
- from the headers command.
- Piping to the headers command causes the
- message headers affected by the previous command to be printed.
- This action is identical to piping to the
- .B from
- command.
- .TP
- .B help
- Help is provided on a per topic basis and on a general basis.
- For general help, just typing
- .I help
- will provide some general information as to how to get further help
- and a list of topics suggested for more specific help.
- There is also help provided for each command by using the \-?
- option to most commands.
- This option will provide command line usage information as well as a
- description of what the command does and how to use it.
- .TP
- .BR history " [\-h] [\-r] [N]"
- This command displays the command history in chronological order; early
- commands are printed first followed by more recent commands displayed last.
- Option
- .I \-h
- suppresses printing of history event numbers with each history command.
- Option
- .I \-r
- reverses the order of the history events displayed.
- .sp
- If a number
- .I N
- is given, then that number of previous commands is
- echoed rather than the number set by the variable
- .BR history .
- .TP
- .BR ignore / unignore
- Display or set a list of headers to be ignored when displaying messages.
- When reading messages, all the message headers are displayed with the text
- body of the message.
- Since these message identifier fields are cumbersome and uninteresting
- in many cases, you can filter out unwanted headers by using this command.
- For example,
- .sp
- .ti +2
- ignore Received Date Message-Id
- .sp
- will ignore the three specified fields.
- The command
- .B unignore
- is used to reverse the effects of
- .BR ignore .
- .TP
- .BR lpr " [\-Pname] [msg_list]"
- takes a message list and sends those messages, one by one, to the printer,
- each separated by page feeds.
- A default printer name is supplied if one is not specified on the
- command line (-Pprinter-name).
- If you have the variable
- .B printer
- set, that printer name will be used.
- .sp
- If the variable
- .B print_cmd
- is set, the command described by that variable will be used instead
- of the default system command.
- In such cases, the -P option and the
- .B printer
- variable are ignored and the command is simply executed as is.
- This is useful for piping messages through to UNIX
- commands (commands not a part of
- .IR Mush .
- .TP
- .B ls
- This command duplicates the
- .I UNIX
- command
- .I /bin/ls.
- The variable
- .B lister
- describes flags to be passed to ls automatically.
- By default,
- .I ls
- always uses the -C flag (column output).
- .TP
- .BR mail " [flags] [recipient ...]"
- .RB ( m )
- Send mail to a list of users.
- If no recipient list is specified on the
- .I Mush
- command line, then a \*QTo: \*U prompt will request one.
- A list of recipients must be supplied.
- This implementation of
- .I Mush
- supports mailing to files and programs as recipients, but at least one
- legitimate user must be specified.
- Filenames must be full pathnames, thus, they must start with a `/' or there
- is no way to know whether a recipient is a pathname or a real user.
- The special characters `+' and `~' may precede pathnames since they are
- expanded first to the user's folder directory (+), as described by the variable
- .BR folder ,
- and the user's home directory (~).
- Mailing to programs is indicated by the pipe `|' character preceding the
- program name.
- Since the user's path is searched, full pathnames are not required for
- programs which lie in the user's PATH environment variable.
- Example:
- .sp
- .ti +2
- mail username, /path/to/filename, "|program_name", +folder_name, ~user/mbox
- .sp
- Options are:
- .nf
- .in +2
- .if n .ta 1.5i
- .if t .ta 1.8i
- \-e immediately enter editor (autoedit)
- \-F add random fortune to the end of message
- \-s [subject] prompt for subject [set subject explicitly]
- \-f [msg_list] forward msg_list (not indented)
- \-h [msg_list] include msg_list with headers
- \-i [msg_list] include msg_list into letter
- \-v verbose (passed to mail delivery program)
- .in -2
- .fi
- .sp
- The verbose option may not be available depending on the mail transport
- agent on your system.
- .sp
- The \-e flag causes you to enter the editor described by the variable
- .BR visual .
- .sp
- The \-i flag will include the current message into the body of the
- message you are about to send.
- The included message is indented by
- the string \*Q> \*U or by the string described by the variables
- .BR indent_str ,
- .BR pre_indent-str ,
- and
- .BR post_indent_str .
- See the VARIABLES section for more information on these string values.
- If a message list is given after the \-i option, then the message
- described by that list are included.
- The \-h option is identical to the \-i option except that the headers of
- the message are also included.
- .sp
- The \-s flag looks at the next argument and sets the subject to that
- string.
- If the string is to contain spaces, enclose the entire subject
- in quotes.
- If there is no following argument, then the subject will
- be prompted for.
- This flag is useful if the user:
- .sp
- .in +2
- .nf
- \(bu does not have the variable \fBask\fR set, or
- \(bu wishes to change the subject used with \fBreply\fR
- .in -2
- .fi
- .sp
- The subject is not prompted for and is ignored completely if the \-f flag
- is specified (see below).
- .sp
- The \-f flag is for message forwarding only.
- An optional message list can be given just as the -i option has.
- The forward option does not allow you to edit the message(s) being forwarded
- unless the -e flag is also specified.
- The subject of the message (if available) is the same as the \fIcurrent\f
- message; it not necessarily the message of the message being forwarded.
- The subject of forwarded mail cannot be changed.
- However, using the \-e flag
- will allow the user to change the subject once in editing mode using the
- escape sequence, \*Q~s\*U.
- .sp
- Forwarded mail that has not been edited by the user will contains special
- headers such as
- .sp
- .ti +2
- Resent-To:
- .ti +2
- Resent-From:
- .sp
- and perhaps other depending on your mail transport agent.
- Sendmail, for example, will add a number of other \*QResent-*\*U headers.
- .TP
- .BR my_hdr / un_hdr
- You can create personalized headers in your outgoing mail using this command.
- .sp
- .nf
- Usages:
- .in +2
- .ta 2.5i
- my_hdr print all your headers
- my_hdr header print value of header
- my_hdr header: string set header to string
- un_hdr header: unset header
- .in -2
- .sp
- .fi
- To set a header, the first argument must be a string
- that contains no whitespace (spaces or tabs) and must end with
- a colon (:).
- The rest of the command line is taken to be the
- text associated with the mail header specified.
- If any quotes are used in the header and the header itself is not set in
- quotes, then quotes should be escaped (preceded) by a backslash.
- This holds true for semicolons, pipe characters
- or any other metacharacter that
- .I Mush
- might interpret as a command line modifier.
- .sp
- If the variable
- .B no_hdrs
- is set, then your headers will not be added to outgoing messages,
- but no headers will be unset.
- The
- .B un_hdr
- command may take `*' as an argument to un_hdr everything set.
- .TP
- .BR pick " [flags] [<pattern>]"
- Allows the user to select particular messages from a folder.
- The <pattern> is a \*Qregular expression\*U as described by
- .IR ed .
- If no arguments are given, the previous expression searched for is used.
- You can search for messages from a user, for a particular subject line,
- between certain dates, and limit searches to a range of messages.
- You can also find all messages that do not
- match the same arguments mentioned above.
- .sp
- .nf
- Options:
- .ta 1.5i
- .in +2
- \-d [\-]date messages sent on or after [`\-' before] date
- \-f search for pattern in \*QFrom\*U field only
- \-h header search for pattern in specified header only
- \-i ignore case of letters when searching
- \-r msg_list search only the listed messages
- \-s search for pattern in \*QSubject\*U field only
- \-t search for pattern in \*QTo\*U field only
- \-x select messages not containing the pattern
- .in -2
- .fi
- .sp
- Only one of \-d, \-f, \-h, \-s and \-t can be specified at once.
- Entire messages are scanned for the <pattern>
- unless \-f, \-h, \-s or \-t is specified.
- Messages marked for deletion are also searched.
- No patterns can be specified with the \-d option,
- and the \-x option may not be used with \-d.
- .sp
- For the \-d option, \*Qdate\*U is of the form:
- .sp
- .ti +2
- month/day/year
- .sp
- with an optional `\-' to specify that the messages of interest are those
- older than that date.
- Omitted fields of the date default to today's values.
- Examples of selecting on date:
- .nf
- .in +2
- .ta 2.0i
- .sp
- pick \-d 4/20 on or after April 20, this year
- pick \-d \-/2/85 on or before the 2nd, this month, 1985
- pick \-d / today only
- .fi
- .in -2
- .sp
- At least one `/' char must be used in a date.
- There is no strong date checking; 2/30 would be considered a valid date.
- .sp
- Other examples of
- .B pick:
- .sp
- .ti +2
- pick \-d 2/5/86 | pick \-d \-2/5/87 | pick \-s "mail stuff" | lpr
- .sp
- will find all the messages between the dates February 5, 1986 and
- February 5, 1987 that contain the subject "mail stuff" and print them.
- .sp
- .ti +2
- pick -s Re: | delete
- .sp
- deletes messages that have \*QRe:\*U in the subject
- .sp
- .ti +2
- folder +project | pick -f frank
- .sp
- Finds all messages from frank in the folder described by +project.
- .sp
- .ti +2
- pick -h return-path ucbvax
- .sp
- Searches all messages that have the header "Return-Path:" and determines
- if the string \*Qucbvax\*U is in the header.
- Note that case sensitivity
- applies only to the pattern searched, not the header itself.
- .TP
- .B preserve
- .RB ( pre )
- Saves a message list in your spool directory rather than
- your mailbox unless it has been explicitly deleted.
- The variable
- .B hold
- causes all messages to be held in your spool directory automatically.
- .TP
- .B print
- .RB ( p ,
- .BR type ,
- .BR t )
- Takes a message list and displays each message on the user's terminal.
- If the first letter of the command is a capital letter (`P' or `T'),
- then \*Qignored\*U headers are not ignored
- .I provided
- that the variable,
- .B alwaysignore
- is not set.
- If the variable is set, the ignored headers will be
- ignored regardless of the command used to display the message.
- See the
- .B ignore
- command for more information about ignored message headers.
- .sp
- The `+' and the `-' keys can be used to display the \*Qnext\*U
- and \*Qprevious\*U messages respectively.
- The `+' key has the caveat that the
- message is not paged at all and none of the messages headers are displayed.
- .TP
- .B pwd
- Prints the current working directory.
- .TP
- .B quit
- .RB ( q )
- Updates the current folder and exits from
- .IR Mush .
- If the variable \*Qhold\*U is set, all messages not marked for deletion are
- saved in the spool directory.
- Otherwise, messages which have been read are saved to
- .I ~/mbox
- or to the file described by the string variable
- .BR mbox .
- Messages marked for deletion are discarded.
- Unread messages go back to the spool directory in all cases.
- .TP
- .BR reply / replyall " [flags]"
- .RB ( r / R )
- Messages are replied to by sending mail to the sender of each message
- in the given message list.
- The commands
- .B replysender
- and
- .B respond
- are equivalent to
- .BR reply .
- .B Replyall
- responds to all the recipients as well as the sender of the message.
- These commands understand all the same flags as the
- .B mail
- command.
- .sp
- When constructing a return mail address to the author of a message,
- .B reply
- searches for special mail headers in the author's message which
- indicate the most efficient mail path for return mail.
- .I Mush
- will search for the \*QFrom:\*U, \*QReply-To:\*U,
- and \*QReturn-Path:\*U headers by default.
- .sp
- If none of these fields are found in the message, the first line of the
- message is parsed;
- this \*QFrom \*U line is different from the \*QFrom: \*U line.
- If the user wishes to change the order or the actual fields to search for
- return paths, then the variable
- .B reply_to_hdr
- may be set to a list of headers to be used (in the order specified).
- If it is set, but has no value, the first \*QFrom \*U line is used
- regardless of what headers the author's message contains.
- This is a special case setting for the variable \*-
- the \*QFrom \*U line may not be specified explicitly as an item in the
- list of reply-to headers.
- .sp
- When replying to all recipients of the message using the
- .B replyall
- .RB ( R )
- command, only the original author's address can be obtained from
- the message headers.
- There is no way determine the best path to the
- other recipients of the message from message headers aside from taking
- their addresses directly from the \*QTo:\*U and \*QCc:\*U lines.
- .sp
- Also see the explanation of the variable
- .B auto_route
- and the MAIL ADDRESSES section for more information concerning
- replying to messages.
- .TP
- .BR save / write / copy " [!] [message list] [filename]"
- .RB ( s / w )
- With no arguments,
- .B save
- and
- .B write
- will save the current message to the file
- .I mbox
- in the user's home directory (or the file specified by the
- .B mbox
- variable).
- If a message list is given, then the messages specified by
- the list are saved.
- If a filename is given, then that filename is used instead of mbox.
- If the file exists and is writable, the specified command
- will append each message to the end of the file.
- If the `!' is given, then the file is overwritten causing whatever contents it
- contains to be lost.
- The
- .B write
- command differs from
- .B save
- and
- .B copy
- in that the message headers are
- .I not
- saved in the file along with the body of text.
- .sp
- If the current folder is the system mailbox, then saved messages are
- marked for deletion when the user exits using the
- .B quit
- command.
- If the variable
- .I keepsave
- is set or the current folder is not the system mailbox, then messages are
- not marked for deletion.
- The
- .B copy
- command is is like
- .B save
- except that messages are never marked for deletion, whether or not
- .B keepsave
- is set.
- .sp
- Because message lists are used to determine the messages to be saved,
- if the user wishes to save messages to a file that begins with a digit
- or any other message list metacharacter, a backslash should precede
- the filename to escape the message list expansion routine.
- The backslash will not become a part of the filename.
- .TP
- .BR saveopts " [file]"
- The complement of
- .BR source ,
- .B saveopts
- will save all settable variables, aliases
- and cmd's in the initialization file.
- (See the
- .B source
- command for more information on initialization files.)
- If an argument is given, that file is used.
- Beware that this will overwrite files, so any \*Qif\*U expressions
- will be lost, as will settings that have changed since entering
- .IR Mush .
- Using saveopts is highly discouraged
- and is intended for the naive user only.
- .TP
- .BR set / unset
- With no arguments, prints all variable values.
- Otherwise, sets option.
- Arguments are of the form \*Qoption=value\*U (whitespace is allowed).
- Boolean expressions need not have \*Q=value\*U associated in the command.
- .sp
- The special command
- .sp
- .ti +2
- set ?all
- .sp
- will print all known variables utilized by the program and a brief
- description of what they do.
- The user may set and manipulate his own set of variables, but internal
- variables that are utilized by the program are the only ones displayed.
- .sp
- The command
- .sp
- .ti +2
- set ?variable_name
- .sp
- will print the same information for one variable instead of all variables.
- You may unset everything by issuing the command \*Qunset *\*U.
- .TP
- .BR sh " [command]"
- Invokes an interactive version of the shell.
- The shell spawned is described by the variable
- .BR shell .
- If the optional argument
- .B command
- is given, then that command is executed under the Bourne Shell.
- If the special character `&' is at the end of any shell command,
- then the command will be executed in background.
- .TP
- .BR source " [file]"
- Read
- .I Mush
- commands from a file.
- If no filename is specified, the files searched
- for are .mushrc or .mailrc in the user's home directory.
- If the environment variable MAILRC is set, then that file is sourced.
- If a filename is given on the command line, that file is sourced.
- See the
- .B INITIALIZATION
- heading and the
- .B home
- variable descriptions for more information.
- .TP
- .B sort " [-] [d | a | s | S | R]"
- This command
- will sort messages according to author, date, status or subject
- (with or without considering the "Re: ", in replied messages).
- In addition, the messages can be sorted in reverse order (same arguments).
- .sp
- .nf
- Options:
- .in +2
- .ta 1i
- - reverse sort order
- d sort by date received
- a sort by author (alphabetical)
- s sort by subject ignoring \*QRe:\*U
- R sort by subject (alphabetical)
- S sort by message status
- .in -2
- .fi
- .sp
- Note that only one argument (except for the `-'), may be used.
- By default (no arguments),
- .B sort
- sorts messages by
- .IR status .
- New, unread messages are first, followed by preserved messages,
- and finally deleted messages are placed at the end of the list.
- .sp
- If the variable
- .I sort
- is set, messages are sorted each time the user's system mailbox is
- read as the current folder.
- The
- .I sort
- variable can be set either to nothing or to legal "sort" arguments.
- .sp
- Subsorting can be achieved by using the piping mechanism intrinsic to
- the line mode interface;
- no other interface allows subsorting \*Qdirectly\*U.
- Each interface may allow subsorting if appropriate actions are taken,
- as discussed below.
- .sp
- To subsort messages, the folder must be in a particular order to begin
- with.
- To sort mail by author and then by subject heading, you would
- have to first sort by author:
- .sp
- .ti +2
- sort a
- .sp
- Now that the messages are in order according to author, sorting a
- sublist of messages is done using pipes:
-