home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume18
/
mush6.4
/
part18
/
mush.1.2
Wrap
Text File
|
1989-03-12
|
50KB
|
1,629 lines
.sp
.nf
.ti +2
alias dan dheller@cory.berkeley.edu island!argv@sun.com
.fi
.sp
This defines the name \*Qdan\*U to be shorthand for two addresses,
both of which happen to be Dan Heller.
.sp
The command
.B unalias
can be used to remove an alias definition.
.sp
With no arguments,
.B alias
prints out all the current aliases.
With one argument, it prints the list associated with that name,
and with more than one argument, it creates a new alias.
.TP
.BR alternates " [host-list] [!path!login] [*]"
.RB ( alts )
This command
is useful if you have accounts on several machines.
It can be used to inform
.I Mush
that your login name at each of the listed hosts is really you.
When you
.B reply
to messages,
.I Mush
will not send a copy of the message to your login name at any of the
hosts listed on the
.B alternates
list. If the special symbox \*Q*\*U is used, then your login name is
matched against all pathnames and local addresses.
.sp
If you have another login name on the local or remote machine, then
that login may be specified by preceding the login name or the path
to the login name by a `!' character.
.sp
For example,
.sp
.nf
.ti +2
alts island maui molokai ceylon !cory.berkeley.edu!dheller !root
.fi
.sp
are all either hostnames or pathnames to my other accounts.
The last item, \*Q!root\*U will match root that is only destined for my
workstation.
Root accounts elsewhere are not considered to be me.
.sp
If the
.B alternates
command is given with no arguments, the current set of alternate
names is displayed.
.TP
.BR bind " [string [command [parameters]]]"
.ns
.TP
.BR unbind " string"
.rs
Bind the sequence of keystrokes specified by
.I string
to the curses-mode function,
.IR command .
The
.I string
is usually one or two characters, or a sequence sent by
one of the \*Qfunction keys\*U of a particular terminal.
See the CURSES INTERFACE section for a complete list of curses-mode
functions; this interface is not available on all systems.
The
.I parameters
are currently recognized only for the special
.B macro
function; see the
.B bind-macro
command for details.
.sp
If no arguments are given to
.BR bind ,
the current set of curses bindings are listed;
if only a
.I string
argument is given, the binding for that string is listed;
and if both a
.I string
and a
.I command
are given, a curses binding is created such that when the
.I string
is typed in curses mode, the function specified by
.I command
will be executed.
.sp
Bindings can be removed by using the
.B unbind
command.
.TP
.BR bind-macro " [string [expansion]]"
This command is an abbreviation, which invokes the
.B bind
command with the special function
.B macro
as the second argument.
The effect of binding a curses macro is that whenever the
.I string
is typed in curses mode, the effect is the same as if the
.I expansion
had been typed instead.
A special sytax is provided for including non-printing (control)
characters in both the
.I string
and the
.IR expansion ;
see the CURSES INTERFACE section and the MACROS section for details.
.sp
If no arguments are given,
.B bind-macro
will list the current curses mode macros.
It is otherwise identical to
.in +4
.B bind
.I string
.B macro
.IR expansion .
.in -4
.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 " [name [command]]"
.ns
.TP
.BR uncmd " name"
.rs
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.
Occasionally, 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 so that
memory bounds won't get overwritten.
.sp
If the user suspects sendmail errors,
a debugging level of 3 or higher will prevent sendmail from starting
and outgoing mail is directed 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
.BR echo " [-n] [-h | -p] arguments"
Echoes all the arguments given on the command line, expanding variables
and history references. If the -n flag is given, then no newline is appended.
If the -h flag is given, then echo looks for formatting parameters
as if the "from" command were given on the "current" message.
If the -p flag is given, then echo looks for formatting parameters
as if your prompt were changed temporarily.
.sp
Examples:
.sp
.nf
.ti +2
echo -h This message is from %a and is dated %d.
.br
might produce:
.ti +2
This message is from island!argv and is dated Dec 14, 1988.
.sp
.ti +2
echo -p There are %n new messages to read in %f.
.br
might produce:
.ti +2
There are 5 new messages to read in /usr/spool/mail/argv.
.fi
.sp
Note that -h and -p cannot be specified together.
.TP
.B edit
.RB ( e ,
.BR v )
This function lets you edit messages in your folder. When editing messages,
be careful not to remove certain message headers such as Date or From or
any others that looks important. If you remove or change something you
shouldn't have, you will be notified and the temporary file used to edit
the message will not be removed.
.TP
.BR eval " arg ..."
As in most shells, the list of arguments to
.B eval
is re-parsed and then executed as a command.
This is useful primarily for causing multiple levels of variable expansion.
.TP
.B exit
.RB ( x )
Returns immediately to the login shell without
modifying the current folder or system spool directory.
.TP
.BR expand " alias-list"
Aliases, given as arguments, are expanded as they would be if you
were to send mail to each.
.TP
.BR fkey " [string [command]]"
.ns
.TP
.BR unfkey " string"
.rs
With no arguments,
.B fkey
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.
There are the left, right and top set of keys.
.sp
Function keys may be unset with the
.B unfkey
command, or by using the function key interface.
.TP
.BR flags " [msg-list] [ [ + | \- ] [ D N O P R r S U ] ]"
This command modifies the flag bits set on the listed messages.
It should not normally be needed, but is provided to allow users, through
the
.B cmd
facility, to alter the ways that certain conditions are recorded.
Multiple flag bits may be set or modified at once.
The modifiable flag bits are:
.sp
.nf
.ta 2i
.in +4
D deleted
N new
O old
P preserved
R read
r replied-to
S saved
U unread
.in -4
.fi
.sp
If a `+' or `\-' precedes the list of bits, the specified bits are turned
on or off respectively, without modifying other bits.
If no `+' or `\-' is given, then the list of bits is set explicitly and
all other bits are lost.
.sp
Message lists can be piped to the
.B flags
command; for example, you may use
.sp
.nf
.ti +4
cmd r 'reply \\!* | flags + r'
.fi
.sp
to mark as
.I replied-to
all messages included in a reply,
.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
.sp
This command can only appear in a pipeline if it is the first command;
it returns a list of all the messages in the new folder.
.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,
.I from
will print the current message's header.
If given a message list,
.I from
will print the headers of those messages that 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 \*QDan\*U 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), \*QS\*U (saved), \*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 shown 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
.if t .ta 1.5i
a all messages
d deleted messages
n new messages
o old messages
r replied to messages
s saved messages
u unread messages
.fi
.in -2
Note that the \-H is not required; \*Qheaders :c\*U is valid.
.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
.BR help " [topic]"
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 " [header-list]"
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.
.TP
.BR ls " [flags]"
This command duplicates the
.IR UNIX (TM)
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 that lie in the user's PATH environment variable.
.sp
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
\-b addr-list set list of blind carbon recipients
\-c addr-list set list of carbon copy recipients
\-e immediately enter editor (autoedit)
\-F add random fortune to the end of message
\-f [msg-list] forward msg_list (not indented)
\-h [msg-list] include msg_list with headers
\-i [msg-list] include msg_list into letter
\-s [subject] prompt for subject [set subject explicitly]
\-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 messages
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 is not necessarily the subject 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 contain special
headers such as
.sp
.ti +2
Resent-To:
.ti +2
Resent-From:
.sp
and perhaps others, depending on your mail transport agent.
Sendmail, for example, may add a number of other \*QResent-*\*U headers.
.TP
.BR map [ ! "] [string [expansion]]"
.ns
.TP
.BR unmap [ ! "] string"
.rs
The
.B map
command creates or lists macros for the line mode interface, and the
.B map!
command creates or lists macros for the message composition mode.
In either mode, macros act in such a way that, when
.I string
is typed, the effect is the same as if
.I expansion
had been typed instead.
The
.I string
is usually one or two control characters, or a sequence sent by
one of the \*Qfunction keys\*U of a particular terminal.
See the MACROS section for the syntax used to specify the
.I string
and the
.IR expansion ,
and for comments on the interactions of macros in the same and in
different modes.
.sp
If no arguments are given, these commands will display the list of
macros and expansions for the appropriate mode.
If only a
.I string
is given, they will display the
.I expansion
associated with that string for the appropriate mode.
Otherwise, they will create a macro, associating the given
.I expansion
with the specified
.IR string .
.sp
Line mode macros are unset with the
.B unmap
command, and composition mode macros are unset with the
.B unmap!
command.
.TP
.BR merge " [-N] folder-name"
Messages from the named folder are read into the current folder.
The header summaries of the merged messages are printed unless the \-N
option is given (see the
.B folder
command, above).
This command can only appear in a pipeline if it is the first command;
it returns a list of all the messages from the merged-in folder.
.TP
.BR my_hdr / un_hdr " [header]"
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
\-ago <format> search for messages relative to today's date.
\-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
The
.I \-ago
option can be abbreviated as
.IR \-a .
Only one of \-a, \-d, \-f, \-h, \-s and \-t can be specified at once.
Entire messages are scanned for the <pattern>
unless \-a, \-d, \-f, \-h, \-s or \-t is specified.
Messages marked for deletion are also searched.
No patterns can be specified with the \-a or \-d options.
.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 April 20, this year.
pick \-d \-/2/85 on or before the 2nd, this month, 1985.
pick \-d +5/4 on or after May 4 of this year.
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
For the \-ago option, the format is very simple. Specify the number of
days followed by the word \*Qdays\*U, or the number of weeks followed by
the word \*Qweeks\*U, and so on with months and years. Truncation is allowed,
since only the first character is examined, so all of the following are
equivalent:
.sp
.in +2
.nf
pick \-ago 1 day, 2 weeks
pick \-ago 2Weeks 1Day
pick \-ago 2w,1day
pick \-a 2w1d
.fi
.in -2
.sp
These examples will find all messages that are exactly 2 weeks and 1 day
old. All \*Qago\*U dates collapse into \*Qday\*U time segments. This
means that months are 30.5 days long. If more precise date selection is
required, use the \-d option and specify specific dates.
.sp
Also note that the \-ago option allows
the \*Qbefore\*U (\-) and \*Qafter\*U (+)
arguments. Thus, you may pick all messages older than 1 week with:
.sp
.ti +2
pick \-ago \-1 week
.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 send them
to the printer.
.sp
.ti +2
pick -s Re: | delete
.sp
deletes messages that have \*QRe:\*U in the Subject header.
.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.
.sp
.ti +2
pick \-ago +1w | save +current
.sp
This finds all messages that are a week or less old and saves them in the file
called \fIcurrent\fR, which is found in the user's \fIfolder\fR variable.
.TP
.BR pipe " [msg-list] unix-command"
Allows the user to send the texts of a list of messages to a
.IR UNIX (TM)
command.
The list of messages may either be given explicitly or may come from
a mush pipeline (see \*QCommand Pipes\*U under FEATURES, and also the
LINE-MODE INTERFACE section).
If a list is neither given nor piped, the current message is used.
Headers which have not been ignored are considered part of the message
text for purposes of this command.
For example,
.sp
.in +4
.nf
pipe 3 5 7 patch
.fi
.in -4
.sp
sends the text of messages 3, 5 and 7 to the
.I patch
utility.
.sp
This command can also be invoked as
.BR Pipe
(note capitalization), in which case only the body of the messages,
and none of the message headers, are sent to the unix command.
.sp
When the variable
.B unix
is set,
.IR UNIX (TM)
commands can appear anywhere
.I except as the first command
in a mush pipeline without explicitly using
.BR pipe .
However, it is still necessary to specify
.B Pipe
in order to exclude all headers.
.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 this 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 that 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 " [msg_list] [-r path] [flags] [users]"
.RB ( r / R )
Messages are replied to by sending mail to the sender of each message
in the given message list.
The command
.B replysender
is 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 that
indicate the most efficient mail path for return mail.
.I Mush
will search for the \*QReply-To:\*U, \*QReturn-Path:\*U,
and \*QFrom:\*U headers, in that order, by default.
.sp
If none of these fields are found in the message, the first line of the
message is parsed if possible;
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.
The \*QFrom \*U line may be specified explicitly as an item in the
list of reply-to headers by specifying the header:
.B From_.
See the VARIABLES section for more information about
.B reply_to_hdr.
.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
Example:
.sp
.ti +2
replyall 3,4,5 -i 4,5 7 -s response mail-group
.sp
Here, messages 3, 4 and 5 are replied to (all the authors are obtained
from each of those messages as well as the recipients from those messages)
and the text from messages 4, 5 and 7 are included in the body of the reply.
The subject is set to "response" and the alias mail-group is appended to
the list of recipients for this message.
.sp
The -r flag will prepend the path to each recipient in the address list
with the indicated path. This overrides the value of \fBauto_route\fR,
but has the exact same functionality. See the explanation of the variable
in the VARIABLES section. Also see the MAIL ADDRESSES section for more
information concerning replying to messages.
.nf
.TP
.BR save / write / copy " [!] [-s | -a] [msg-list] [filename / directory]"
.fi
.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.
The -s options forces the filename used to be that of the subject of
the message. Similarly, the -a option causes the filename used to be
that of the author of the message being saved. If more than one message
is being saved, the subject or author name used is that of the smallest
message number (since message lists have no order of precedence). With
these two options, a directly name may be given to specify a directory
other than the current directory.
.sp
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 ,
.BR saveopts ,
will save all settable variables, aliases
and cmd's in the initialization file.
(See the INITIALIZATION
section 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 " [[?]variable [= value]]"
.ns
.TP
.BR unset " variable"
.rs
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.
.sp
It is possible to set a variable to a list of messages returned by another
command by using the piping mechanism. For example,
.sp
.ti +2
pick \-s Status Reports | set reports
.sp
The variable, reports, now contains a message list which can be used
as the message list argument to any commands which accepts one.
.sp
.ti +2
mail \-i $reports boss
.sp
This command will mail to \*Qboss\*U and include all the messages held
in the \fIreports\fP variable.
.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 INITIALIZATION heading and the
.B home
variable descriptions for more information.
.TP
.BR sort " [\-] [a | d | 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
a sort by author (alphabetical)
d sort by date
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
When sorting by date, the boolean variable
.B date_received
is checked. If it is set, then sorting goes by date received.
Otherwise (default), sorting is by date sent by the original author.
.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:
.sp
.ti +2
pick \-f island!argv@sun.com | sort s
.sp
This finds all messages from the user \*Qisland!argv@sun.com\*U
and sorts them by subject.
Since these messages are already grouped together via the
previous sort command, the sorting by subject (s) will restrict itself
to such messages.
You may specify the exact message list by specifying
that message list on the command line and using a pipe:
.sp
.ti +2
10\-. | sort d
.sp
This command means to sort the messages from 10 to the current message
according to the date.
.sp
To specify subsorting from with the curses interface, the temporary
curses escape key must be used (the colon `:') and the command issued
at the `:' prompt (as if giving an \*Qex\*U command to \*Qvi\*U).
When the command is finished, the \*Q...continue...\*U prompt is given and
the user may continue or return to the top level of the curses mode.
.sp
In the tool interface, the user must map a function key to the desired
command.
Select the \*QOpts\*U icon with the right mouse button, choose
the menu item labeled \*Qfunction keys\*U and use the interface provided
to set a function key to the desired piped mechanism.
.TP
.B stop
For systems with job control, stop will cause
.I Mush
to send a SIGTSTP to itself.
The command was introduced to facilitate
the stop-job action from a complex command line alias rather than the user
having to type his stop character explicitly.
.TP
.B top
Takes a message list and prints the top few lines of each.
The number of lines printed is controlled by the variable
.B toplines
and defaults to the size of the value of the variable
.B crt.
This command is ignored in the tool mode.
.TP
.BR undigest " [-m] [msg_list] [filename]"
A \*Qdigest\*U is a mail message which is a collection of other mail messages
mailed to a \*Qmoderator\*U by other users. The moderator compiles all the
messages into a folder and sends the result to all the subscribers of the
mailing list. The
.B undigest
command disassembles the entries into the set of messages which comprises
the digest.
.sp
The -m option will merge these messages into the current folder. Otherwise,
if a filename is specified, a new folder is created and the user can change
folders to read the messages separately.
.sp
If a message list is specified, each digest is disassembled to the same
filename (if given). If no filename is given and the user did not request
a merge, then a temporary file is made.
.sp
.SH VARIABLES
Shell variables are controlled via the
.B set
and
.B unset
commands.
Options may be either boolean, in which case it is only
significant to see whether or not they are set;
string, in which case the actual value is of interest;
or numerical, in which case the numerical value is important.
Some variables may have attributes
of boolean and string at the same time.
.PP
If you or the program references a variable that is not explicitly set,
then the environment variables are checked and a pointer to that data
is returned.
.PP
Certain variables that happen to be set to pathnames can be modified
by one of two variable modifiers.
The modifiers `:h' and `:t' may be applied to the variable names.
The current implementation allows only one `:' modifier on each `$' expansion.
.TP
:t
The variable is treated as a file path name, and the name of the file
(the \*Qtail\*U of the path) is substituted for the variable.
That is, everything to the right of the last `/'
is returned.
.TP
:h
The variable is treated as a path name, and the \*Qhead\*U of the pathname
is substituted for the variable.
That is, everything up to, but not including, the last `/' is returned.
.PP
Thus, you could set your prompt:
.sp
.nf
.ti +2
cmd fo 'fo \!*; set prompt = "! [$thisfolder:t] "'
.fi
.sp
Here, whenever you change folders, your prompt will tell you the name
of the folder you're in.
.PP
Following is a list of all predefined variables.
.TP
.B alwaysignore
(Boolean)
If set, the mail headers set by the
.B ignore
command are always ignored.
Normally, ignored headers are not ignored when sending messages to
the printer, when interpolating messages into letters with ~f or ~H,
when the `P' or `T' command is given (see the \fBprint\f command),
or with the \-h flag to the
.B mail
or
.B reply
commands.
Setting
.B alwaysignore
will ignore those headers even in the situations mentioned here.
No headers can be ignored during updates and when using the
.B save
command since the user may ignore headers that are required by
.I Mush
or any other mail system to read those folders.
.sp
Also see the
.B ignore
command for more information.
.TP
.B ask
(Boolean)
If set, you will be prompted for a subject header for outgoing mail.
If not set, the Subject header will be displayed as a blank header.
Use the tilde escape \*Q~s\*U to set the header once in the message
or specify the \-s option on the
.B mail
command line at the
.I Mush
prompt.
.TP
.B askcc
(Boolean)
If set, you will be prompted for a Cc (carbon copy) list when you are
finished editing a letter to be sent.
In the tool mode, this is ignored; the Cc list
is always prompted for after the Subject prompt.
.TP
.B autodelete
(Boolean)
When exiting mail, all messages that have been read
.I "regardless of whether they have been marked for deletion"
are removed.
Only messages that haven't been read or that have been marked as
.B preserved
are not removed.
.TP
.B autoedit
(Boolean)
If set, you are automatically put into your editor whenever you
send or reply to mail.
.TP
.B autoinclude
(Boolean)
When replying to any mail, a copy of the message being replied to
is automatically inserted into your message body indented by
the string described by the variable
.BR indent_str .
.TP
.B autoprint
(Boolean)
After you delete a message, the next message is printed automatically.
.TP
.B auto_route
(String)
If set boolean (not to a string), all the recipients in a message that
is being replied to (via \fBreplyall\fR), will be routed through the path
back to the original author.
.sp
For example, if the original sender of a message came from the remote host
.B c3p0
and the list of recipients looked like
.sp
.nf
.in +2
From: c3p0!user1
To: yourhost!you
Cc: r2d2!user2, r2d2!user3
.in -2
.fi
.sp
then clearly, \*Quser1\*U on the machine c3p0 can talk to your machine
and the machine named r2d2.
However, you would not be able to respond to those users if your machine
did not exchange UUCP mail with the host r2d2.
.sp
.I Mush
will attempt to solve this problem by reconstructing the addresses
for \*Quser2\*U and \*Quser3\*U according to the address of the original
sender, \*Qc3p0\*U.
The new addresses for \*Quser2\*U and \*Quser3\*U should therefore become
.sp
.ti +2
c3p0!r2d2!user2, c3p0!r2d2!user3.
.sp
If your machine not only talks to c3p0,
but talks to r2d2 as well, it becomes unnecessary to route the mail
through both c3p0 and r2d2.
So, the variable
.B known_hosts
may be set to a list of hosts which you know your machine to have
UUCP mail connections with.
This list is checked when constructing mail addresses for replies only and
the shortest path is made by removing from the UUCP path those hosts
that do not need to be called or are redundant.
See the entry for
.B known_hosts
for more information.
.sp
If
.B auto_route
is set to a specific \fBpathname\fR (host names separated by !'s),
all addresses in the reply will have this route prepended to their addresses.
This ignores the original path of the author. This is quite useful for
hosts which talk uucp to a node which is connected to the internet or uunet
since both of those machines tend to be one-hop away from all other hosts
(or reroute accordingly). For example, if a message was addressed like so:
.sp
.in +2
.nf
To: root@ucbvax.berkeley.edu, argv@island.uucp
Cc: ucbcad!foo!bar
.sp
.fi
.in -2
If auto_route were set to "ucbcad", then replies to this address would be
directed addressed like so:
.sp
.in +2
.nf
To: ucbcad!ucbvax.berkeley.edu!root, ucbcad!island.uucp!argv
Cc: ucbcad!foo!bar
.sp
.fi
.in -2
.sp
This assumes that the host in question talks uucp with ucbcad. This example
demonstrates several things. First, notice that all addresses are converted
to uucp-style format. Whenever routing is changed, the format is converted
like this. Secondly, note that the Cc: line did not change. This is because
all redundant hostnames from UUCP pathnames are removed
to avoid unnecessary UUCP connections and speed up mail delivery.
.sp
Another example of how auto_route truncates UUCP paths:
.sp
.ti +2
pixar!island!sun!island!argv
.sp
Here, mail was probably originally sent to users at pixar and sun from
somewhere undetermined now.
Since sun and pixar do not talk to each other, the users on those machines may
have responded to mail creating the type of addresses stated above.
Here, it can be seen that we can reduce the path to the host
.IR island :
.sp
.ti +2
pixar!island!argv
.sp
See the MAIL ADDRESSES section for more detailed information
about legal mail addresses.
.sp
Note that the -r flag to \fBreply\fR and \fRreplyall\fR overrides the
value of \fBauto_route\fR.
.TP
.B autosign
(Boolean/string)
Append a signature to outgoing mail.
If this variable is set, but not to a string (e.g., boolean-true)
then the file ~/.signature is used.
.sp
Otherwise, the variable is interpreted in one of three ways.
By default, the string is interpreted as a pathname relative to the
.I current
directory.
For this reason, it is advisable to use full pathnames here.
As usual, the special characters `~' and `+' are expanded.
If a file is found, it is opened and its contents are read into the
message buffer.
.sp
If the variable is set to a string that begins with `$', then that string
is interpreted as a user-definable variable and is expanded and appended
to the letter.
.sp
Finally, if the variable is set to a string that begins with a backslash (\\)
then the string itself (minus the `\\' character) is used; no expansion
is done and no files are read.
.sp
In the latter two cases, it is advisable to set the variable using single
quotes to avoid expanding the variable beforehand or eliminating the
backslash.
Examples:
.sp
.nf
.ti +2
set autosign = '$foo'
.ti +2
set autosign = '\\ Dan Heller island!argv@ucbcad.berkeley.edu'
.fi
.sp
.BR Warning :
if redirection from the calling shell is used,
no signature or fortune will be added to outgoing mail.
For example,
.sp
.ti +2
% mush \-s report manager < report_file
.sp
In this command, mail is being sent to the user \*Qmanager\*U and the
subject is set to \*Qreport\*U and the file \*Qreport_file\*U is being
redirected as input. In this case, there will be \fIno\fR signature
appended.
.TP
.B autosign2
(String)
This alternate signature is available for special cases where the default
signature is not desired or if no signature is desired for special addresses
or if only special addresses require a signature.
The format for this variable is:
.sp
.ti +2
autosign2 = \*Qaddress1, address2, ... : <signature>\*U
.sp
Each address can be one of these types:
.TP
1) address
Legal mailing addresses that do not contain comment
fields (see the sections MAIL ADDRESSES for more information on legitimate
mail addresses).
.TP
2) *username
If the username is present on the recipient list, regardless of what
remove site the user may reside (including locally), the pattern matches.
.TP
3) !hostname !host1!host2...
Any user can be specified as long as he resides on the specified hostname.
If a path of hosts is specified, then the user must reside on the end of
the specified path.
.TP
4) @dom.ain
The user must reside on any host within the domain specified. Neither
the user or the hostname needs to match; only the domain name must be
required to match.
.sp
Example:
.sp
.nf
.ti +2
set autosign2 = \*Q!island @berkeley.edu @mit.edu *schaefer root: \--dan\*U
.fi
.sp
This means that any mail sent to 1) anyone at island, 2) anyone within
the berkeley domain, 3) anyone within the mit domain, 4) Bart Schaefer
(at any host anywhere -- even locally),
and 4) root on my local machine only (or, root@my-machine-name)
will be signed by my "alternate" signature. If any address on the
recipient list fails to satisfy these four matches, the mail will be
signed by my regular signature.
.sp
One can have a local signature and a remote signature by specifying
the autosign2 to include the hostname of the home machine the user
is logged into. Note the \*Qisland\*U example above.
.sp
The list of recipients, after alias expansion and comment removal, is
then scanned and the following patterns are matched against those addresses
specified in the autosign2 or fortunates variable according to these rules.
.sp
The signature description is the same as described by
.B autosign
variable. The colon (:) separates the list of addresses from the signature
description. If there is no colon or the address list is missing, the
entire string is considered the signature (except for the colon).
.sp
If
.B autosign
is not set, then autosign2 will ONLY work if the tilde command \*Q~S\*U
is specified. In this way, a user may never have autosign set and just
set autosign2 to be some signature value. The user may then issue the
tilde command to automatically sign the letter.
If a list of addresses is given (terminated by a colon), then all
recipients of the message must be in the list of addresses in autosign2;
otherwise, the signature in \fBautosign\fR (if set) is used instead.
A null signature in autosign2 will not sign the letter.
.sp
Example:
.sp
.nf
.ti +2
set autosign2 = "fred, barney, wilma, betty: ~/flintstone.sig"
.fi
.sp
If a message is sent to:
.sp
.ti +2
To: fred, wilma
.sp
Then the file ~/flinstone.sig will be used.
However, if the address were:
.sp
.ti +2
To: barney, betty, bambam
.sp
Then autosign2 will not be used because bambam is not in the list.
.sp
Note that mail sent via redirection from the calling shell will not
sign letters or append fortunes.
.TP
.B cdpath
(String)
Set to a string of pathnames separated by spaces to use when searching
for a directory when the
.B cd
command is issued.
If this variable is used, it is recommended that the path `.' be included.
Note that this differs from the
.IR csh ,
which does not require that `.' be present.
.TP
.B crt
(Numeric)
Set to a value that describes the number of lines a message
must have before invoking the
.B pager
to view a message.
.TP
.B cwd
(String)
The
.B "current working directory"
string is automatically set upon startup of
.I Mush