home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-06 | 55.0 KB | 1,727 lines |
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # If this archive is complete, you will see the following message at the end:
- # "End of archive 3 (of 19)."
- # Contents: mush/makefile.xenix mush/mush.1.b
- # Wrapped by argv@turnpike on Wed May 2 13:59:20 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'mush/makefile.xenix' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/makefile.xenix'\"
- else
- echo shar: Extracting \"'mush/makefile.xenix'\" \(2244 characters\)
- sed "s/^X//" >'mush/makefile.xenix' <<'END_OF_FILE'
- X#
- X# makefile for Xenix machines. See "MODEL" below for your xenix type.
- X# some .c files may require the -LARGE compiler flag. Examples below.
- X# This makefile assumes an 80386 machine. If you have an 80286, see
- X# notes below. This makefile was built for SCO/microsoft xenix --if you
- X# are running some other kind of xenix, you might need to change the
- X# CFLAGS and LDFLAGS options.
- X#
- XHDRS= mush.h config.h-dist strings.h bindings.h options.h version.h glob.h
- XSRCS1= main.c init.c misc.c execute.c
- XSRCS2= signals.c msgs.c pick.c viewopts.c
- XSRCS3= sort.c expr.c folders.c dates.c
- XSRCS4= loop.c bind.c options.c
- XSRCS5= commands.c setopts.c hdrs.c
- XSRCS6= mail.c print.c
- XSRCS7= curses.c curs_io.c
- XSRCS8= file.c strings.c malloc.c
- XSRCS9= lock.c macros.c addrs.c glob.c
- XOBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
- X signals.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
- X folders.o dates.o loop.o viewopts.o bind.o curses.o curs_io.o \
- X lock.o macros.o options.o addrs.o malloc.o glob.o
- XHELP_FILES= README README-7.0 README-7.1 mush.1 cmd_help \
- X Mushrc Mailrc Gnurc sample.mushrc advanced.mushrc digestify
- X
- X# Memory model. Use -M3e for 80386 machines.
- X# Use -M2le -Mt32 -LARGE for 80286 machines.
- XMODEL= -M3e
- X
- X#
- X# 80286 xenix may use this LDFLAGS define:
- X#LDFLAGS= -X -lx -M2le -Mt32 -F 8000 -SEG 256 -LARGE
- XLDFLAGS= -X -lx -M3
- X
- XCFLAGS= $(MODEL) -O -DSYSV -DCURSES -DREGCMP -DUSG
- XLIBES= -lcurses -ltermlib
- XOTHERLIBS=
- X# Use some variant of this one if you #define MMDF in config.h
- X#OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
- X
- Xmush: $(OBJS)
- X @echo loading...
- X @cc $(LDFLAGS) $(OBJS) $(LIBES) $(OTHERLIBS) -o mush
- X
- X$(OBJS): config.h mush.h
- Xloop.o: version.h
- X
- X# For 80286 machines, use these two lines...
- X# misc.o: misc.c
- X# cc $(CFLAGS) -LARGE -c misc.c
- X
- Xbind.o: bind.c
- X cc $(CFLAGS) -LARGE -c bind.c
- X
- Xclean:
- X rm -f *.o core mush
- X
- XBINDIR= /usr/local/bin
- XLIBDIR= /usr/local/lib
- XMRCDIR= /usr/lib
- XMANDIR= /usr/local/man/man1
- XMANEXT= 1
- X
- Xinstall: mush
- X cp mush $(BINDIR)
- X strip $(BINDIR)/mush
- X chmod 0755 $(BINDIR)/mush
- X cp mush.1 $(MANDIR)/mush.$(MANEXT)
- X chmod 0644 $(MANDIR)/mush.$(MANEXT)
- X cp cmd_help $(LIBDIR)
- X chmod 0644 $(LIBDIR)/cmd_help
- X cp Mushrc $(MRCDIR)/Mushrc
- X chmod 0644 $(MRCDIR)/Mushrc
- END_OF_FILE
- if test 2244 -ne `wc -c <'mush/makefile.xenix'`; then
- echo shar: \"'mush/makefile.xenix'\" unpacked with wrong size!
- fi
- # end of 'mush/makefile.xenix'
- fi
- if test -f 'mush/mush.1.b' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/mush.1.b'\"
- else
- echo shar: Extracting \"'mush/mush.1.b'\" \(50595 characters\)
- sed "s/^X//" >'mush/mush.1.b' <<'END_OF_FILE'
- Xbinding control character sequences in the initialization file.
- XThis format
- Xis also used to display the current key-command mappings by the program.
- X.PP
- XTo specify control characters in ASCII format for the bind command, the
- Xsequence \*Q\\Cc\*U is used where `c' is the
- Xcharacter that the control key will translate to and must be in upper case.
- XThe sequence \*Q\\CP\*U would map to control-P.
- XIf the user wishes to indicate the RETURN key, this is specified
- Xwith the string \*Q\\n\*U and
- Xthe tab key is specified by the string \*Q\\t\*U.
- XAs a more complex example, on a Wyse-50 terminal, the 8th function key
- Xoutputs the three characters: control-A, H, line-feed.
- XTo map this function key to a command, the
- Xuser would have to enter the sequence \*Q\\CAH\\n\*U as the key sequence,
- Xthen follow up with a valid curses command. From then on, if the user
- Xpresses that function key,
- Xthe command mapped to it will be executed.
- X.PP
- XThe ESCAPE key is signified by the sequence, \*Q\\E\*U.
- XOn a Sun-3 workstation,
- Xthe R1 key outputs the character sequence: ESC, [, 2, 0, 8, z.
- XThe corresponding
- X.B bind
- Xkey sequence would be \*Q\\E[208z\*U.
- XRestrictions are that key sequences may not contain the space character
- Xunless bound in line mode, and can never begin with a digit.
- X.PP
- XWhenever a command is entered, other than `^L'
- X.RB ( redraw ),
- Xwhich causes the screen to scroll or be refreshed in any way,
- X.I Mush
- Xis left in the
- X.I continue
- Xmode.
- XWhen in this mode, the user is given his line-mode prompt followed
- Xby \*Q...continue...\*U indicating that he may issue a new command or
- Xreturn to the top level where the current message headers are displayed
- Xon the screen.
- XRemember that this is still the curses mode, but much time
- Xis saved by avoiding redrawing the screen after each command.
- XThe user may move up and down messages using the appropriate commands
- X(j/k by default) or anything else the curses mode allows.
- XOnly the exit and quit commands will return to the top level.
- XBecause of this, there are 2 additional
- Xways to \*Qquit\*U from curses mode and return to the login shell.
- XThe \*Qexit\*U and \*Qquit\*U commands will quit from the top level, but
- Xthe commands
- X.B exit!
- Xand
- X.B quit!
- Xare used to exit from the \*Qcontinue\*U level in the curses interface as well
- Xas from the top level.
- X.PP
- XNote that the best way to understand the curses interface is to just use it.
- XIn line mode, the command \*Qcurses\*U puts you into curses mode.
- X.SH "GRAPHICS TOOL INTERFACE"
- XWhen running the window-based tool interface, there will be five
- Xsubwindows:
- Xa panel for folder-related commands and general options,
- Xa scrollable display of message header summaries,
- Xanother panel of message manipulation commands,
- Xa four-line scrollable window for warnings and output from certain commands,
- Xand a larger window which is used for displaying messages.
- XThe message display and command output windows can be scrolled with
- Xthe up and down cursor keys (function keys R8 and R14 by default),
- Xand also recognize \*Qvi\*U movements (j, k, ^U, ^D, etc.),
- Xin addition to having scrollbars.
- X.PP
- XIn the header summary window, pressing the LEFT mouse button while pointing
- Xat a message header displays that message in the large message window at the
- Xbottom of the frame.
- XPressing the middle button deletes the message, and pressing the RIGHT mouse
- Xbutton displays a menu of actions that will affect the message.
- XPossible actions are to display the message, delete or undelete it, reply to
- Xit, save it, preserve it
- X(see the
- X.B preserve
- Xcommand), or print it (hardcopy).
- X.PP
- XAll panel items in the frame have labels describing their functionality.
- XSelecting
- Xa panel item with the LEFT mouse button causes the action to be executed.
- XThe RIGHT mouse button displays a menu of options that the command may
- Xbranch to.
- XFor example, the
- X.B Save
- Xpanel item by default will save messages to the file \*Qmbox\*U, but the
- XRIGHT mouse button causes a menu to be displayed, and the choices of
- Xwhere to save the message increase to include the items in the menu.
- XThese typically include the files in the user's folder directory (see the
- X.B folder
- Xvariable below).
- X.PP
- XAt the end of most lists of menu entries for panel items is an item
- Xlabelled \*Qhelp\*U.
- XWhen this item is chosen, an new window is opened where help for that
- Xcommand is displayed.
- XThe help windows can be scrolled in the same ways as the message
- Xdisplay window.
- X.I "Note: The limited number of file descriptors in SunOS 3.5 forces"
- XMush
- X.I "to display help information in the"
- X.IR "message window in the main frame" .
- X.\" Some nroffs can't handle long .IR arguments
- X.PP
- XWhen composing letters,
- Xa separate frame is created which includes a panel of command items,
- Xa four-line scrollable window,
- Xand a large window for editing the letter.
- XPanel items for including messages, editing (via your usual text editor),
- Xsending, aborting the message, and various other manipulations are supplied.
- XSee the section on \*QSending mail\*U, under the summary of tilde escapes,
- Xfor more details of composition frame command items.
- XAs long as the composition frame is open, all
- X.I Mush
- Xcommand output is
- Xredirected from the small window in the main frame to the small window here.
- X\fINote: This subwindow is not present in SunOS 3.5 due
- Xto the limited number of file descriptors; command output stays in the
- Xmain frame in that case\fR.
- XThe SunView
- X.I textsw
- Xinterface is used by default in the large window for paging and editing.
- XCursor movement with the function keys (R8, R10, R12, and R14 by default)
- Xis supported.
- X.SH COMMANDS
- XDescribed below are legal commands understood by
- X.I Mush
- Xthat you can type at the line mode prompt.
- XMost commands have abbreviations
- X(given in parentheses) and can be followed by message lists.
- XIn most cases,
- Xwhitespace is not necessary to separate commands from message lists.
- XFor example, \*Qd*\*U will delete all messages, and \*Qu1-7 {4}\*U will
- Xundelete messages 1 through 7 except for message number 4.
- X.B NOTE:
- X\fIThis \*Qtoken splitting\*U may have unexpected side effects, especially
- Xfor \fRUNIX\fI commands whose names contain digits.\fR
- X.PP
- XThe ability to customize commands using the
- X.B cmd
- Xfacility allows users to customize
- X.I Mush
- Xto resemble other mailers.
- XHowever, efforts have already been made to include commands that are backwards
- Xcompatible with other line-mode mailers.
- XUsers of the graphics tool mode of
- X.I Mush
- Xmay have little need for the command line mode because the icon based
- Xinterface allows interaction with many commands.
- XThe tool mode is much more restrictive in favor of a simpler, user
- Xfriendly interface, but most useful commands may be achieved anyway.
- X.PP
- XThe following is a list of all recognized commands.
- XSince most commands accept a
- X.I "message list"
- Xas an argument, arguments are noted only when they differ from a message list.
- X.TP
- X.BR alias " [name] [address-list]"
- X.ns
- X.TP
- X.BR unalias " name"
- XThe
- X.B alias
- Xcommand defines a name to stand for a list of addresses.
- XThe defined name can then be substituted for the entire list when
- Xsending mail.
- XFor example,
- X.sp
- X.nf
- X.ti +2
- Xalias dan dheller@cory.berkeley.edu argv@zipcode.com
- X.fi
- X.sp
- XThis defines the name \*Qdan\*U to be shorthand for two addresses,
- Xboth of which happen to be Dan Heller.
- X.sp
- XThe command
- X.B unalias
- Xcan be used to remove an alias definition.
- X.sp
- XWith no arguments,
- X.B alias
- Xprints out all the current aliases.
- XWith one argument, it prints the list associated with that name,
- Xand with more than one argument, it creates a new alias.
- X.TP
- X.BR alternates " [host-list] [!path!login] [*[user]]"
- X.RB ( alts )
- XThis command
- Xis useful if you have accounts on several machines.
- XIt can be used to inform
- X.I Mush
- Xthat your login name at each of the listed hosts is really you.
- XWhen you
- X.B reply
- Xto messages,
- X.I Mush
- Xwill not send a copy of the message to your login name at any of the
- Xhosts listed on the
- X.B alternates
- Xlist. If the special symbol \*Q*\*U is used, then your login name is
- Xmatched against all pathnames and local addresses.
- XA user name may be appended to the \*Q*\*U, in which case that name is
- Xmatched instead of your login name.
- X.sp
- XIf you have another login name on the local or remote machine, then
- Xthat login may be specified by preceding the login name or the path
- Xto the login name by a `!' character.
- X.sp
- XFor example,
- X.sp
- X.nf
- X.ti +2
- Xalts zipcode maui1 !cory.berkeley.edu!dheller !root
- X.fi
- X.sp
- Xare all either hostnames or pathnames to my other accounts.
- XThe last item, \*Q!root\*U will match root that is only destined for my
- Xworkstation.
- XRoot accounts elsewhere are not considered to be me.
- X.sp
- XIf the
- X.B alternates
- Xcommand is given with no arguments, the current set of alternate
- Xnames is displayed.
- X.TP
- X.BR await " [\-T timeout]"
- XDirects the shell to wait for the arrival of new mail.
- XNew mail is checked approximately every 30 seconds, or every
- X.I timeout
- Xseconds as specified by the \-T option.
- XThis command does not return until new mail arrives
- Xor until a keyboard interrupt (^C) is typed.
- XUnless the string \*Qawait\*U appears in the value of the variable
- X.BR quiet ,
- Xthe terminal bell will ring when
- X.B await
- Xreads in a new message (see the VARIABLES section for details).
- X.TP
- X.BR bind " [string [command [parameters]]]"
- X.ns
- X.TP
- X.BR unbind " string"
- X.rs
- XBind the sequence of keystrokes specified by
- X.I string
- Xto the curses-mode function,
- X.IR command .
- XThe
- X.I string
- Xis usually one or two characters, or a sequence sent by
- Xone of the \*Qfunction keys\*U of a particular terminal.
- XSee the CURSES INTERFACE section for a complete list of curses-mode
- Xfunctions; this interface is not available on all systems.
- XThe
- X.I parameters
- Xare currently recognized only for the special
- X.B macro
- Xfunction; see the
- X.B bind-macro
- Xcommand for details.
- X.sp
- XIf no arguments are given to
- X.BR bind ,
- Xthe current set of curses bindings are listed;
- Xif only a
- X.I string
- Xargument is given, the binding for that string is listed;
- Xand if both a
- X.I string
- Xand a
- X.I command
- Xare given, a curses binding is created such that when the
- X.I string
- Xis typed in curses mode, the function specified by
- X.I command
- Xwill be executed.
- X.sp
- XBindings can be removed by using the
- X.B unbind
- Xcommand.
- X.TP
- X.BR bind-macro " [string [expansion]]"
- XThis command is an abbreviation, which invokes the
- X.B bind
- Xcommand with the special function
- X.B macro
- Xas the second argument.
- XThe effect of binding a curses macro is that whenever the
- X.I string
- Xis typed in curses mode, the effect is the same as if the
- X.I expansion
- Xhad been typed instead.
- XA special syntax is provided for including non-printing (control)
- Xcharacters in both the
- X.I string
- Xand the
- X.IR expansion ;
- Xsee the CURSES INTERFACE section and the MACROS section for details.
- X.sp
- XIf no arguments are given,
- X.B bind-macro
- Xwill list the current curses mode macros.
- XIt is otherwise identical to
- X.in +4
- X.B bind
- X.I string
- X.B macro
- X.IR expansion .
- X.in -4
- X.TP
- X.B cd
- XChange the working directory to that specified, if given.
- XIf no directory is given, then changes to the user's home directory.
- X.TP
- X.BR cmd " [name [command]]"
- X.ns
- X.TP
- X.BR uncmd " name"
- X.rs
- XCommand line aliases are set and unset using these commands.
- XMore extensive information is given in the LINE-MODE INTERFACE section.
- X.B Uncmd
- Xmay take `*' as an argument to uncmd everything set.
- X.TP
- X.BR curses " [off]"
- XThe
- X.B curses
- Xcommand causes
- X.I Mush
- Xto change from the line-oriented mode to the screen-oriented (curses)
- Xmode, as described above in the CURSES INTERFACE section.
- XThis command may not be given when curses mode is already active.
- XWhen used in an initialization file (such as
- X.IR .mushrc )
- Xthis command is the same as giving the \-C (\-curses) switch on the
- X.B mush
- Xcommand line.
- X.sp
- XThe argument
- X.I off
- Xmay be used
- X.I only
- Xin initialization files, including those read with \-I (\-init),
- Xand has the effect of turning off the \-C switch.
- X.I Off
- Xis ignored at all other times, even in files read with \-F (\-source).
- X.TP
- X.BR debug " [N]"
- XSet debugging level to N (1 by default).
- XWhen in debug mode, the user can see some of the flow of
- Xcontrol the program makes while executing.
- XThe intent of the debug level is for tracking down
- Xbugs with the program at specific locations.
- XOccasionally, the program may segmentation fault and core dump.
- XWhen this happens, the user can reenter the program,
- Xset the debugging level and recreate the problem.
- X.sp
- XIf the user suspects memory allocation problems, a debugging
- Xlevel of 5 or higher will prevent memory from being freed so that
- Xmemory bounds won't get overwritten.
- X.sp
- XIf the user suspects Mail Transport Agent errors,
- Xa debugging level of 3 or higher will prevent the MTA from starting
- Xand outgoing mail is directed to the standard output instead of actually
- Xbeing sent.
- X.TP
- X.BR delete / undelete
- X.RB ( d / u )
- XTakes a message list as argument and marks them all as deleted.
- XDeleted messages will not be saved in
- X.IR mbox ,
- Xnor will they be available for most other commands.
- XIf the folder has not been updated, deleted messages can be recovered
- Xwith
- X.BR undelete .
- X.TP
- X.B dt
- XDeletes the current message and prints the next message.
- X.TP
- X.BR echo " [-n] [-h | -p] arguments"
- XEchoes all the arguments given on the command line, expanding variables
- Xand history references. If the -n flag is given, then no newline is appended.
- XIf the -h flag is given, then echo looks for formatting parameters
- Xas if the "from" command were given on the "current" message.
- XIf the -p flag is given, then echo looks for formatting parameters
- Xas if your prompt were changed temporarily.
- X.sp
- XExamples:
- X.sp
- X.nf
- X.ti +2
- Xecho -h This message is from %a and is dated %d.
- X.br
- Xmight produce:
- X.ti +2
- XThis message is from zipcode!argv and is dated Dec 14, 1988.
- X.sp
- X.ti +2
- Xecho -p There are %n new messages to read in %f.
- X.br
- Xmight produce:
- X.ti +2
- XThere are 5 new messages to read in /usr/spool/mail/argv.
- X.fi
- X.sp
- XNote that -h and -p cannot be specified together.
- X.TP
- X.B edit
- X.RB ( e ,
- X.BR v )
- XThis function lets you edit messages in your folder. When editing messages,
- Xbe careful not to remove certain message headers such as Date or From or
- Xany others that looks important. If you remove or change something you
- Xshouldn't have, you will be notified and the temporary file used to edit
- Xthe message will not be removed.
- X.TP
- X.BR eval " [\-h | \-p] arg ..."
- XAs in most shells, the list of arguments to
- X.B eval
- Xis re-parsed and then executed as a command.
- XThis is useful primarily for causing multiple levels of variable expansion.
- X.sp
- XIf the \-h option is given,
- X.B eval
- Xwill expand header format strings in the argument list before executing the
- Xcommand.
- XSimilarly, the \-p option will expand prompt format strings in the argument
- Xlist before executing.
- XThese formats are expanded \fIlast\fR, after all history and variable
- Xexpansion is completed, and are implicitly quoted, so embedded quotes,
- Xspaces, tabs, `!'s, etc. are handled correctly.
- XHeader formats are expanded using the
- X.I current
- Xmessage.
- XFor example,
- X.sp
- X.ti +2
- Xeval \-h pick \-f %a
- X.sp
- Xwill find all messages from the same author as the current message.
- XSee the the entries for
- X.I hdr_format
- Xand
- X.I prompt
- Xin the VARIABLES section for more details.
- X.sp
- XNote that -h and -p cannot be specified together.
- X.TP
- X.B exit
- X.RB ( x )
- XReturns immediately to the login shell without
- Xmodifying the current folder or system spool directory.
- X.TP
- X.BR expand " alias-list"
- XAliases, given as arguments, are expanded as they would be if you
- Xwere to send mail to each.
- X.TP
- X.BR flags " [ [ + | \- ] [ D f N O P p R r S U ] ] [msg-list]"
- XThis command modifies the flag bits set on the listed messages.
- XIt should not normally be needed, but is provided to allow users, through
- Xthe
- X.B cmd
- Xfacility, to alter the ways that certain conditions are recorded.
- XMultiple flag bits may be set or modified at once.
- XThe modifiable flag bits are:
- X.sp
- X.nf
- X.ta 2i
- X.in +4
- XD deleted
- Xf forwarded
- XN new
- XO old
- XP preserved
- Xp printed
- XR read
- Xr replied-to
- XS saved
- XU unread
- X.in -4
- X.fi
- X.sp
- XIf a `+' or `\-' is included in the list of bits, the specified bits are
- Xturned on or off respectively, without modifying other bits.
- XIf no `+' or `\-' is given, then the list of bits is set explicitly and
- Xall other bits are lost.
- XThe `\-' modifier can be escaped with a backslash (i.e., \*Q\\\-\*U) to
- Xprevent its interpretation as part of a message range, or it may be given
- X\fIafter\fR the list of bits for the same reason.
- X.sp
- XMessage lists can be piped to the
- X.B flags
- Xcommand; for example, you may use
- X.sp
- X.nf
- X.ti +4
- Xcmd r 'flags \\!* + r | reply'
- X.fi
- X.sp
- Xto mark as
- X.I replied-to
- Xall messages included in a reply.
- X.TP
- X.BR folder " [\-N] [-n] [\-r] [ %[user] | # | & | file ]"
- X.RB ( fo )
- XChange current folder.
- XWith no arguments, prints the name of the current folder.
- XThe arguments are:
- X.nf
- X.ta 1i
- X.in +2
- X\-N No headers are displayed upon entering new folder
- X\-n The current folder is not updated
- X\-r Set Read-Only mode (can't alter new folder)
- X%[user] Change to /usr/spool/mail/[user] (default is yours)
- X# Switch back to the previous folder
- X& Change folder to $mbox (default is ~/mbox)
- X.in -2
- X.fi
- X.sp
- XFile names that do not begin with `/' are interpreted relative to the current
- Xdirectory unless they begin with one of the metacharacters `+' or `~'.
- XAs in
- X.IR csh ,
- Xthe character `~' expands to the user's home directory (or to some other
- Xuser's home directory if used as \*Q~username\*U).
- XThe character `+' is expanded to the name of the user's
- X.I folder
- Xdirectory (defaults to \*Q~/Mail\*U or the value of the variable
- X.BR folder ).
- XFor compatibility with other mailers, no `/' character needs to appear
- Xbetween the `+' and the name of the folder (see \*QFilename metacharacters\*U
- Xin the LINE-MODE INTERFACE section).
- X.sp
- XThis command can only appear in a pipeline if it is the first command;
- Xit returns a list of all the messages in the new folder.
- XThis command cannot be used in initialization files before the shell
- Xhas started.
- X.sp
- XFor compatibility with older versions, the argument `!' with
- Xno leading `\-' is interpreted as \-n.
- X.TP
- X.B folders
- XList the names of the folders in your folder directory.
- XYour folder directory is the directory
- X.I Mail
- Xin your home directory.
- XOr, you can set the variable
- X.B folder
- Xto specify another folder directory.
- X.br
- X.TP
- X.BR from " [ + | \- ] [msg-list] [pattern]"
- X.RB ( f )
- XWith no arguments,
- X.B from
- Xwill print the current message's header summary (see the variable
- X.BR hdr_format ).
- XIf given a pattern,
- X.B from
- Xwill print the headers of those messages whose \*QFrom:\ \*U lines
- Xmatch the pattern.
- XWhen a message list precedes the pattern, or when a message list is
- Xsupplied by a pipeline, the search is restricted to that list.
- XIf only a message list is given (or piped),
- X.B from
- Xwill print the headers of the listed messages.
- X.sp
- XThe special arguments `\-' and `+' can be given to move the
- Xcurrent message pointer to the previous or next message,
- Xrespectively, while also printing that message's header.
- XIf a message list was given in addition to `\-' or `+', then
- Xthe current message pointer will be set to the first or last
- Xmessage, respectively, in the message list given.
- XExamples:
- X.sp
- X.ti +2
- Xfrom + Dan
- X.sp
- Xwill print the headers of all messages that contain \*QDan\*U in
- Xin the author's name and set the current message pointer to
- Xthe last one of that kind in the list.
- X.sp
- X.ti +2
- Xfrom \- 10-30 {16}
- X.sp
- Xwill print the headers of messages 10 through 30 except for
- Xmessage 16 and set the current message pointer to 10.
- X.sp
- X.ti +2
- Xfrom +
- X.sp
- Xwill print the header of the message after the current message
- Xand increment the current message pointer to the next message.
- X.sp
- X.ti +2
- Xfrom $
- X.sp
- Xwill print the last message's header and not move the current
- Xmessage pointer.
- X.TP
- X.BR headers " [ [\-H][:c] ] [ + | \- ]"
- X.RB ( h ,
- X.BR z )
- XPrints a screenful of message headers listed in the
- Xcurrent folder.
- XIf a message number is given on the command line,
- Xthe first message of the screenful of messages will be
- Xthat message number.
- XThe `z' command is identical to the \*Qh +\*U
- Xcommand and remains for compatibility reasons.
- XThe variable
- X.B screen
- Xmay be set to tell how many headers are in a screenful.
- XIn the graphics tool mode, the variable
- X.B screen_win
- Xcontains the number of headers used in the headers subwindow.
- X.sp
- XA typical header may look like:
- X.sp
- X.ti +2
- X5 >N argv@spam.istc.sri.com Feb 19, (10/278) Test
- X.sp
- XThis line indicates that it is message number 5 and the
- X.I >
- Xindicates that the \*Qcurrent message pointer\*U is pointing to this
- Xmessage.
- XThe next two positions indicate the message status.
- XThe first
- Xmay be one of, \*QN\*U (new and unread), \*QU\*U (old, but still
- Xunread), \*Q*\*U (deleted), \*QS\*U (saved), \*QP\*U (preserved),
- Xor \*Q \*U (read).
- XThe second position may have an \*Qr\*U if the message
- Xhas been replied to.
- X.sp
- XThe author of the example message header is
- X.IR argv@spam.istc.sri.com ,
- Xthe date is
- X.IR "Feb 19" ,
- Xthe number of lines in the message is
- X.IR 10 ,
- Xthe number of characters is
- X.I 278
- Xand the subject of the message is
- X.IR Test .
- XThe format of the message header shown here is described by
- Xthe string variable
- X.BR hdr_format .
- XThe example given above has a hdr_format of
- X.sp
- X.ti +2
- Xset hdr_format = "%25f %7d (%l/%c) %25s"
- X.sp
- XSee the description of
- X.B hdr_format
- Xin the VARIABLES section for more information on header formats.
- X.sp
- XYou can print a special subset of message headers by using the
- X.I \-H:c
- Xoption, where `c' is one of:
- X.nf
- X.in +2
- X.ta 1i
- X.if t .ta 1.5i
- Xa all messages
- Xd deleted messages
- Xn new messages
- Xo old messages
- Xr replied to messages
- Xs saved messages
- Xu unread messages
- X.fi
- X.in -2
- XNote that the \-H is not required; \*Qheaders :c\*U is valid.
- X.sp
- XMore options to the
- X.B headers
- Xcommand include
- X.RI ` + '
- Xand
- X.RI ` \- '.
- XEach will print the next or previous screenful of message headers.
- XThe
- X.B z
- Xcommand can also be used; `z' alone will print the next
- Xscreenful (thus, the `+' is optional)
- Xand \*Qz \-\*U is equivalent to \*Qh \-\*U.
- X.sp
- XHeaders affects all the messages it displays, so piping may be done
- Xfrom the headers command.
- XPiping to the headers command causes the
- Xmessage headers affected by the previous command to be printed.
- XThis action is identical to piping to the
- X.B from
- Xcommand.
- X.TP
- X.BR help " [topic]"
- XHelp is provided on a per topic basis and on a general basis.
- XFor general help, just typing
- X.I help
- Xwill provide some general information as to how to get further help
- Xand a list of topics suggested for more specific help.
- XThere is also help provided for each command by using the \-?
- Xoption to most commands.
- XThis option will provide command line usage information as well as a
- Xdescription of what the command does and how to use it.
- X.sp
- XIf no help file is found, an error message will be printed.
- XThe location of the help files may be reset by setting the variables
- X.B cmd_help
- Xand
- X.B tool_help
- Xto the paths of the new help files.
- X.sp
- XThe
- X.B tool_help
- Xvariable is recognized only by versions capable of using suntool mode
- X(tool mode need not be active).
- X.TP
- X.BR history " [\-h] [\-r] [N]"
- XThis command displays the command history in chronological order; early
- Xcommands are printed first followed by more recent commands displayed last.
- XOption
- X.I \-h
- Xsuppresses printing of history event numbers with each history command.
- XOption
- X.I \-r
- Xreverses the order of the history events displayed.
- X.sp
- XIf a number
- X.I N
- Xis given, then that number of previous commands is
- Xechoed rather than the number set by the variable
- X.BR history .
- X.sp
- XSee the LINE-MODE INTERFACE section for a description of referencing the
- Xhistory in commands.
- X.TP
- X.BR ignore / unignore " [header-list]"
- XDisplay or set a list of headers to be ignored when displaying messages.
- XWhen reading messages, all the message headers are displayed with the text
- Xbody of the message.
- XSince these message identifier fields are cumbersome and uninteresting
- Xin many cases, you can filter out unwanted headers by using this command.
- XFor example,
- X.sp
- X.ti +2
- Xignore Received Date Message-Id
- X.sp
- Xwill ignore the three specified fields.
- XAdditional
- X.B ignore
- Xcommands are cumulative.
- XThe command
- X.B unignore
- Xis used to reverse the effects of
- X.BR ignore .
- X.sp
- XFor another way to control this, see the variable
- X.BR show_hdrs .
- X.TP
- X.BR lpr " [-h] [-n] [\-Pname] [msg-list]"
- XTakes a message list and sends those messages, one by one, to the printer,
- Xeach separated by page feeds.
- XThe \-h option suppresses printing of ignored headers (see the
- X.B ignore
- Xcommand and the variables
- X.B show_hdrs
- Xand
- X.BR alwaysignore ),
- Xand the \-n option suppresses all headers.
- XA default printer name is supplied if one is not specified on the
- Xcommand line
- X.RI (\-P printer-name ).
- XIf you have the variable
- X.B printer
- Xset, that printer name will be used.
- X.sp
- XIf the variable
- X.B print_cmd
- Xis set, the command described by that variable will be used instead
- Xof the default system command.
- XIn such cases, the -P option and the
- X.B printer
- Xvariable are ignored and the command is simply executed as is.
- X.sp
- XThe \*Qprinted\*U status bit is set for each message printed by this command.
- X.TP
- X.BR ls " [flags]"
- XThis command duplicates the
- X.IR UNIX (TM)
- Xcommand
- X.I /bin/ls.
- XBy default,
- X.I ls
- Xalways uses the -C flag (columnate output).
- X.TP
- X.BR mail " [flags] [recipient ...]"
- X.RB ( m )
- XSend mail to a list of users.
- XIf no recipient list is specified on the
- X.I Mush
- Xcommand line, then a \*QTo: \*U prompt will request one.
- XA list of recipients must be supplied at some time before the message is
- Xsent, but is not required to begin composing a letter.
- XThis implementation of
- X.I Mush
- Xsupports mailing to files and programs as recipients.
- XFilenames must be full pathnames; thus, they must start with a `/' or there
- Xis no way to know whether a recipient is a pathname or a user name.
- XThe special characters `+' and `~' may precede pathnames since they are
- Xexpanded first to the user's folder directory (+), as described by the variable
- X.BR folder ,
- Xand the user's home directory (~).
- XMailing to programs is indicated by the pipe `|' character preceding the
- Xprogram name.
- XSince the user's path is searched, full pathnames are not required for
- Xprograms that lie in the user's PATH environment variable.
- X.sp
- XExample:
- X.sp
- X.ti +2
- Xmail username, /path/to/filename, "|program_name", +folder_name, ~user/mbox
- X.sp
- XOptions are:
- X.nf
- X.in +2
- X.if n .ta 1.5i
- X.if t .ta 1.8i
- X\-b addr-list set list of blind carbon recipients
- X\-c addr-list set list of carbon copy recipients
- X\-E edit outgoing message headers
- X\-e immediately enter editor (autoedit)
- X\-F add random fortune to the end of message
- X\-f [msg-list] forward messages (not indented)
- X\-H file read file as prepared text (no headers)
- X\-h file read file as a draft (text and headers)
- X\-I [msg-list] include messages with headers (indented)
- X\-i [msg-list] include messages in letter (indented)
- X\-s [subject] prompt for subject [set subject explicitly]
- X\-U send draft immediately (use only with \-h)
- X\-u unsigned: no signatures or fortunes added
- X\-v verbose (passed to mail delivery program)
- X.in -2
- X.fi
- X.sp
- XThe verbose option may not be available depending on the mail transport
- Xagent on your system.
- X.sp
- XThe \-e flag causes you to enter the editor described by the variable
- X.BR visual .
- X.sp
- XThe \-E flag causes
- X.I Mush
- Xto place the headers of the outgoing message in
- Xthe editor file so they can be changed.
- XSee the description of the variable
- X.B edit_hdrs
- Xfor details.
- X.sp
- XThe \-i flag will include the current message into the body of the
- Xmessage you are about to send.
- XThe included message is indented by
- Xthe string \*Q> \*U or by the string described by the variables
- X.BR indent_str ,
- X.BR pre_indent_str ,
- Xand
- X.BR post_indent_str .
- XSee the VARIABLES section for more information on these string values.
- XIf a message list is given after the \-i option, then the messages
- Xdescribed by that list are included.
- XThe \-I option is identical to the \-i option except that the headers of
- Xthe message are also included.
- X.sp
- XThe \-s flag looks at the next argument and sets the subject to that
- Xstring.
- XIf the string is to contain spaces, enclose the entire subject
- Xin quotes.
- XIf there is no following argument, then the subject will
- Xbe prompted for.
- XThis flag is useful if the user:
- X.sp
- X.in +2
- X.nf
- X\(bu does not have the variable \fBask\fR set, or
- X\(bu wishes to change the subject used with \fBreply\fR
- X.in -2
- X.fi
- X.sp
- XThe subject is not prompted for and is ignored completely if the \-f flag
- Xis specified (see below).
- X.sp
- XThe \-f flag is for message forwarding only.
- XAn optional message list can be given just as the -i option has.
- XThe forward option does not allow you to edit the message(s) being forwarded
- Xunless the -e flag is also specified.
- XThe subject of the message (if available) is the same as the
- X.I current
- Xmessage; it is not necessarily the subject of the message being forwarded.
- XThe subject of forwarded mail cannot be changed.
- XHowever, using the \-e flag
- Xwill allow the user to change the subject once in editing mode either by
- Xusing the escape sequence, \*Q~s\*U, or by editing the \*QSubject:\*U header.
- X.sp
- XForwarded mail that has not been edited by the user will contain special
- Xheaders such as
- X.sp
- X.ti +2
- XResent-To:
- X.ti +2
- XResent-From:
- X.sp
- Xand perhaps others, depending on your mail transport agent.
- XSendmail, for example, may add a number of other \*QResent-*\*U headers.
- X.sp
- XThe \-u option, meaning \*Qunsigned\*U, prevents signatures and fortunes
- Xfrom being appended to the message.
- XIt overrides the variables
- X.B autosign
- Xand
- X.BR fortune ,
- Xbut will affect the \-F option only if given after it on the command line.
- X.sp
- XThe \-h option indicates that the given file is a previously prepared
- Xmessage, possibly a partial one saved with \*Q~w\*U.
- XSuch a file is called a \fIdraft\fR.
- XThe file argument must be given, and
- Xin the current implementation
- Xall message headers must either be
- Xpresent in the file or must be added manually by the user.
- XAt minimum, there must be a \*QTo:\*U header;
- X.I Mush
- Xwill add \*QFrom:\*U and \*QDate:\*U headers when sending, if necessary.
- XTo read a prepared text file that does not contain headers, use \-H.
- XIf the \-U option is also given, then the letter is sent immediately without
- Xfurther editing.
- X.sp
- X.TP
- X.BR map [ ! "] [string [expansion]]"
- X.ns
- X.TP
- X.BR unmap [ ! "] string"
- X.rs
- XThe
- X.B map
- Xcommand creates or lists macros for the line mode interface, and the
- X.B map!
- Xcommand creates or lists macros for the message composition mode.
- XIn either mode, macros act in such a way that, when
- X.I string
- Xis typed, the effect is the same as if
- X.I expansion
- Xhad been typed instead.
- XThe
- X.I string
- Xis usually one or two control characters, or a sequence sent by
- Xone of the \*Qfunction keys\*U of a particular terminal.
- XSee the MACROS section for the syntax used to specify the
- X.I string
- Xand the
- X.IR expansion ,
- Xand for comments on the interactions of macros in the same and in
- Xdifferent modes.
- X.sp
- XIf no arguments are given, these commands will display the list of
- Xmacros and expansions for the appropriate mode.
- XIf only a
- X.I string
- Xis given, they will display the
- X.I expansion
- Xassociated with that string for the appropriate mode.
- XOtherwise, they will create a macro, associating the given
- X.I expansion
- Xwith the specified
- X.IR string .
- X.sp
- XLine mode macros are unset with the
- X.B unmap
- Xcommand, and composition mode macros are unset with the
- X.B unmap!
- Xcommand.
- X.TP
- X.BR merge " [-N] folder-name"
- XMessages from the named folder are read into the current folder.
- XThe header summaries of the merged messages are printed unless the \-N
- Xoption is given (see the
- X.B folder
- Xcommand, above).
- XThis command can only appear in a pipeline if it is the first command;
- Xit returns a list of all the messages from the merged-in folder.
- XThis command cannot be used in initialization files before the shell
- Xhas started.
- X.TP
- X.BR my_hdr / un_hdr " [header]"
- XYou can create personalized headers in your outgoing mail using this command.
- X.sp
- X.nf
- XCommand usage:
- X.in +2
- X.ta 2.5i
- Xmy_hdr print all your headers
- Xmy_hdr header print value of header
- Xmy_hdr header: string set header to string
- Xun_hdr header: unset header
- X.in -2
- X.sp
- X.fi
- XTo set a header, the first argument must be a string
- Xthat contains no whitespace (spaces or tabs) and must end with
- Xa colon (:).
- XThe rest of the command line is taken to be the
- Xtext associated with the mail header specified.
- XIf any quotes are used in the header and the header itself is not set in
- Xquotes, then quotes should be escaped (preceded) by a backslash.
- XThis holds true for semicolons, pipe characters
- Xor any other metacharacter that
- X.I Mush
- Xmight interpret as a command line modifier.
- X.sp
- XIf the variable
- X.B no_hdrs
- Xis set, then your headers will not be added to outgoing messages,
- Xbut no headers will be unset.
- XThe
- X.B un_hdr
- Xcommand may take `*' as an argument to un_hdr everything set.
- X.sp
- XExample:
- X.sp
- X.ti +2
- Xmy_hdr Phone-Number: (415) 499-8649
- X.sp
- X.I Mush
- Xtreats the the header \*QFrom:\*U as a special case.
- XIf you have set your own From:, a simple test is performed to determine
- Xwhether the address given is valid.
- XAny UUCP or domain address that directs mail to your login at the local
- Xmachine should be acceptable, but certain configurations may prevent some
- Xcombinations from being recognized.
- XIf the address is valid, your From: header will be used; otherwise, an
- Xaddress known to be valid will be generated and used instead.
- XSome mail transport agents are \*Qpicky\*U and will not allow
- X.I Mush
- Xto supply a From: header; in these cases, your From: header is silently
- Xremoved at send time, and replaced with one generated by the MTA.
- X.sp
- XNote: You cannot set the \*QDate:\*U.
- XAttempting to do so will not result in any
- Xerror messages; your date will simply be overwritten
- Xby the system when your mail is sent.
- X.TP
- X.BR pick " [flags] [<pattern>]"
- XAllows the user to select particular messages from a folder.
- XThe <pattern> is a \*Qregular expression\*U as described by
- X.IR ed .
- XIf no arguments are given, the previous expression searched for is used.
- XYou can search for messages from a user, for a particular subject line,
- Xbetween certain dates, and limit searches to a range of messages.
- XYou can also find all messages that do not
- Xmatch the same arguments mentioned above.
- X.sp
- X.nf
- XOptions:
- X.ta 1.5i
- X.in +2
- X+<num> keep only the first <num> messages matched (head).
- X\-<num> keep only the last <num> messages matched (tail).
- X\-ago <format> search for messages relative to today's date.
- X\-d [+|\-]date messages sent on or [+ after] [`\-' before] date.
- X\-e take all remaining arguments to be the pattern.
- X\-f search for pattern in \*QFrom\*U field only.
- X\-h header search for pattern in specified header only.
- X\-i ignore case of letters when searching.
- X\-r msg-list search only the listed messages.
- X\-s search for pattern in \*QSubject\*U field only.
- X\-t search for pattern in \*QTo\*U field only.
- X\-x select messages that do \fInot\fR match the pattern.
- X.in -2
- X.fi
- X.sp
- XThe
- X.I \-ago
- Xoption can be abbreviated as
- X.IR \-a .
- XOnly one of \-a, \-d, \-f, \-h, \-s and \-t can be specified at once.
- XEntire messages are scanned for the <pattern>
- Xunless \-a, \-d, \-f, \-h, \-s or \-t is specified.
- XMessages marked for deletion are also searched.
- XNo patterns can be specified with the \-a or \-d options.
- XThe \-x option may not be used in conjunction with
- X.IR + n
- X(head) and
- X.IR \- n
- X(tail).
- X.sp
- XFor the \-d option, \*Qdate\*U is of the form:
- X.sp
- X.ti +2
- Xmonth/day/year
- X.sp
- Xwith an optional `\-' to specify that the messages of interest are those
- Xolder than that date.
- XOmitted fields of the date default to today's values.
- XExamples of selecting on date:
- X.nf
- X.in +2
- X.ta 2.0i
- X.sp
- Xpick \-d 4/20 on April 20, this year.
- Xpick \-d \-/2/85 on or before the 2nd, this month, 1985.
- Xpick \-d +5/4 on or after May 4 of this year.
- Xpick \-d / today only.
- X.fi
- X.in -2
- X.sp
- XAt least one `/' char must be used in a date.
- XThere is no strong date checking; 2/30 would be considered a valid date.
- X.sp
- XFor the \-ago option, the format is very simple. Specify the number of
- Xdays followed by the word \*Qdays\*U, or the number of weeks followed by
- Xthe word \*Qweeks\*U, and so on with months and years. Truncation is allowed,
- Xsince only the first character is examined, so all of the following are
- Xequivalent:
- X.sp
- X.in +2
- X.nf
- Xpick \-ago 1 day, 2 weeks
- Xpick \-ago 2Weeks 1Day
- Xpick \-ago 2w,1day
- Xpick \-a 2w1d
- X.fi
- X.in -2
- X.sp
- XThese examples will find all messages that are exactly 2 weeks and 1 day
- Xold. All \*Qago\*U dates collapse into \*Qday\*U time segments. This
- Xmeans that months are 30.5 days long. If more precise date selection is
- Xrequired, use the \-d option and specify specific dates.
- X.sp
- XAlso note that the \-ago option allows
- Xthe \*Qbefore\*U (\-) and \*Qafter\*U (+)
- Xarguments. Thus, you may pick all messages older than 1 week with:
- X.sp
- X.ti +2
- Xpick \-ago \-1 week
- X.sp
- XOther examples of
- X.B pick:
- X.sp
- X.ti +2
- Xpick \-d 2/5/86 | pick \-d \-2/5/87 | pick \-s "mail stuff" | lpr
- X.sp
- XWill find all the messages between the dates February 5, 1986, and
- XFebruary 5, 1987, that contain the subject "mail stuff" and send them
- Xto the printer.
- X.sp
- X.ti +2
- Xpick -s Re: | delete
- X.sp
- XDeletes messages that have \*QRe:\*U in the Subject header.
- X.sp
- X.ti +2
- Xfolder +project | pick \-f frank
- X.sp
- XFinds all messages from frank in the folder described by +project.
- X.sp
- X.ti +2
- Xpick \-h return-path ucbvax
- X.sp
- XSearches all messages that have the header "Return-Path:" and determines
- Xif the string \*Qucbvax\*U is in the header.
- XNote that case sensitivity
- Xapplies only to the pattern searched, not the header itself.
- X.sp
- X.ti +2
- Xpick \-ago +1w | save +current
- X.sp
- XThis finds all messages that are a week or less old and saves them in the file
- Xcalled \fIcurrent\fR, which is found in the user's \fIfolder\fR variable.
- X.sp
- X.ti +2
- Xpick +3 mush-users
- X.sp
- XFinds the first three messages containing the string \*Qmush-users\*U.
- X.sp
- X.ti +2
- Xeval -h "pick +2 \-r .-$ \-s %s" | pick \-1
- X.sp
- XFinds the next message with the same subject as the current message.
- X.TP
- X.BR pipe " [\-p pattern] [msg-list] unix-command"
- XAllows the user to send the texts of a list of messages to a
- X.IR UNIX (TM)
- Xcommand.
- XThe list of messages may either be given explicitly or may come from a
- X.I Mush
- Xpipeline (see \*QPiping commands\*U under the LINE-MODE INTERFACE section).
- XIf a list is neither given nor piped, the current message is used.
- XAll headers are considered part of the message text for purposes of this
- Xcommand unless the value of the variable
- X.B alwaysignore
- Xincludes the word \*Qpipe\*U (see
- X.B alwaysignore
- Xin the VARIABLES section for more information).
- XFor example,
- X.sp
- X.in +4
- X.nf
- Xpipe 3 5 7 patch
- X.fi
- X.in -4
- X.sp
- Xsends the text and headers of messages 3, 5 and 7 to the
- X.I patch
- Xutility.
- X.sp
- XIf a
- X.I pattern
- Xis specified with the \-p option, \fIMush\fR will search
- Xthe message for a line beginning with that string.
- XThe matching line and all succeeding lines will be sent to the
- X.IR unix-command .
- XIf \-p is not given, and the
- X.I unix-command
- Xis omitted, \fIMush\fR will search for a line beginning with \*Q#!\*U
- Xand feed that line and all succeeding lines to \*Q/bin/sh\*U.
- XThus,
- X.B pipe
- Xwith no arguments treats the current message as a shell script.
- X.sp
- XThe pattern may also be of the form
- X.I /pattern1/,/pattern2/
- Xin which case printing will begin with the line containing
- X.I pattern1
- Xand end with the line containing
- X.I pattern2
- X(inclusive).
- XPatterns of this form must still match at beginning of line, and
- Xregular expressions are not currently allowed.
- X.sp
- XThe
- X.B pipe
- Xcommand can also be invoked as
- X.B Pipe
- X(note capitalization), in which case only the body of the messages,
- Xand none of the message headers, are sent to the unix command.
- X.sp
- XWhen the variable
- X.B unix
- Xis set,
- X.IR UNIX (TM)
- Xcommands can appear anywhere
- X.I except as the first command
- Xin a
- X.I Mush
- Xpipeline without explicitly using
- X.BR pipe .
- XHowever, it is still necessary to specify
- X.B Pipe
- Xin order to exclude all headers.
- X.sp
- X.IR Note :
- XAll messages listed as arguments to
- X.B pipe
- Xor
- X.B Pipe
- Xare sent to the standard input of the
- X.I same
- Xprocess as a continuous stream! This is probably not desirable when
- Xextracting shell scripts in particular, so take care.
- XFuture revisions may provide an option to control this behavior.
- X.TP
- X.B preserve
- X.RB ( pre )
- XSaves a message list in your spool directory rather than
- Xyour mailbox unless it has been explicitly deleted.
- XThe variable
- X.B hold
- Xcauses all messages to be held in your spool directory automatically.
- X.TP
- X.B print
- X.RB ( p ,
- X.BR type ,
- X.BR t )
- XTakes a message list and displays each message on the user's terminal.
- XIf the first letter of the command is a capital letter (`P' or `T')
- Xthen \*Qignored\*U headers are not ignored
- X.I provided
- Xthat the variable
- X.B alwaysignore
- Xis either not set or is set to one of its possible values.
- XIf this variable is set with no value, the ignored headers will be
- Xignored regardless of the command used to display the message.
- XSee the
- X.B ignore
- Xcommand for more information about ignored message headers.
- X.sp
- XThe `+' and the `\-' keys can be used to display the \*Qnext\*U
- Xand \*Qprevious\*U messages respectively.
- XThe `+' key has the caveat that the
- Xmessage is not paged at all and none of the messages headers are displayed.
- X.TP
- X.B pwd
- XPrints the current working directory.
- X.TP
- X.B quit
- X.RB ( q )
- XUpdates the current folder and exits from
- X.IR Mush .
- XIf the variable \*Qhold\*U is set, all messages not marked for deletion are
- Xsaved in the spool directory.
- XOtherwise, messages that have been read are saved to
- X.I ~/mbox
- Xor to the file described by the string variable
- X.BR mbox .
- XMessages marked for deletion are discarded.
- XUnread messages go back to the spool directory in all cases.
- X.TP
- X.BR reply / replyall " [msg-list] [-r path] [flags] [users]"
- X.RB ( r / R )
- XMessages are replied to by sending mail to the sender of each message
- Xin the given message list.
- XThe command
- X.B replysender
- Xis equivalent to
- X.BR reply .
- X.B Replyall
- Xresponds to all the recipients as well as the sender of the message.
- XThese commands understand all the same flags as the
- X.B mail
- Xcommand.
- X.sp
- XWhen constructing a return mail address to the author of a message,
- X.B reply
- Xsearches for special mail headers in the author's message that
- Xindicate the most efficient mail path for return mail.
- X.I Mush
- Xwill search for the \*QReply-To:\*U, \*QReturn-Path:\*U,
- Xand \*QFrom:\*U headers, in that order, by default.
- X.sp
- XIf none of these fields are found in the message, the first line of the
- Xmessage is parsed if possible;
- Xthis \*QFrom\ \*U line is different from the \*QFrom:\ \*U line.
- XIf the user wishes to change the order or the actual fields to search for
- Xreturn paths, then the variable
- X.B reply_to_hdr
- Xmay be set to a list of headers to be used (in the order specified).
- XIf it is set, but has no value, the first \*QFrom\ \*U line is used
- Xregardless of what headers the author's message contains.
- XThe \*QFrom\ \*U line may be specified explicitly as an item in the
- Xlist of reply-to headers by specifying the header:
- X.B From_.
- XSee the VARIABLES section for more information about
- X.B reply_to_hdr.
- X.sp
- XWhen replying to all recipients of the message using the
- X.B replyall
- X.RB ( R )
- Xcommand, only the original author's address can be obtained from
- Xthe message headers.
- XThere is no way to determine the best path to the
- Xother recipients of the message from message headers aside from taking
- Xtheir addresses directly from the \*QTo:\*U and \*QCc:\*U lines.
- X.sp
- XExample:
- X.sp
- X.ti +2
- Xreplyall 3,4,5 -i 4,5 7 -s response mail-group
- X.sp
- XHere, messages 3, 4 and 5 are replied to (all the authors are obtained
- Xfrom each of those messages as well as the recipients from those messages)
- Xand the text from messages 4, 5 and 7 are included in the body of the reply.
- XThe subject is set to "response" and the alias mail-group is appended to
- Xthe list of recipients for this message.
- X.sp
- XThe -r flag will prepend the path to each recipient in the address list
- Xwith the indicated path. This overrides the value of \fBauto_route\fR,
- Xbut has the exact same functionality. See the explanation of the variable
- Xin the VARIABLES section. Also see the MAIL ADDRESSES section for more
- Xinformation concerning replying to messages.
- X.nf
- X.TP
- X.BR save / write / copy " [\-f] [\-s | \-a] [msg-list] [filename / directory]"
- X.fi
- X.RB ( s / w )
- XWith no arguments,
- X.B save
- Xand
- X.B write
- Xwill save the current message to the file
- X.I mbox
- Xin the user's home directory (or the file specified by the
- X.B mbox
- Xvariable).
- XIf a message list is given, then the messages specified by
- Xthe list are saved.
- XIf a filename is given, then that filename is used instead of mbox.
- XThe \-s options forces the filename used to be that of the subject of
- Xthe message. Similarly, the \-a option causes the filename used to be
- Xthat of the author of the message being saved. If more than one message
- Xis being saved, the subject or author name used is that of the smallest
- Xmessage number (since message lists have no order of precedence). With
- Xthese two options, a directory name may be given to specify a directory
- Xother than the current directory.
- X.sp
- XIf the file exists and is writable, the specified command
- Xwill append each message to the end of the file.
- XIf \-f is given, then the file is overwritten causing whatever contents it
- Xcontains to be lost.
- XFor compatibility with older versions, the character `!' may be substituted
- Xfor \-f (no `\-' is used with `!').
- XIf the current folder is the system mailbox, then saved messages are
- Xmarked for deletion when the user exits using the
- X.B quit
- Xcommand.
- XIf the variable
- X.I keepsave
- Xis set or the current folder is not the system mailbox, then messages are
- Xnot marked for deletion.
- X.sp
- XThe
- X.B write
- Xcommand differs from
- X.B save
- Xand
- X.B copy
- Xin that the message headers are
- X.I not
- Xsaved in the file along with the body of text.
- XThe
- X.B copy
- Xcommand is is like
- X.B save
- Xexcept that messages are never marked for deletion, whether or not
- X.B keepsave
- Xis set.
- X.sp
- XBecause message lists are used to determine the messages to be saved,
- Xif the user wishes to save messages to a file that begins with a digit
- Xor any other message list metacharacter, a backslash should precede
- Xthe filename to escape the message list expansion routine.
- XThe backslash will not become a part of the filename.
- X.TP
- X.BR saveopts " [file]"
- XThe complement of
- X.BR source ,
- X.BR saveopts ,
- Xwill save all settable variables, aliases
- Xand cmd's in the initialization file.
- X(See the INITIALIZATION
- Xsection for more information on initialization files.)
- XIf an argument is given, that file is used.
- XBeware that this will overwrite files, so any \*Qif\*U expressions
- Xwill be lost, as will settings that have changed since entering
- X.IR Mush .
- XUsing saveopts is highly discouraged
- Xand is intended for the naive user only.
- X.TP
- X.BR set " [[?]variable [= value]]"
- X.ns
- X.TP
- X.BR unset " variable"
- X.rs
- XWith no arguments,
- X.B set
- Xprints all variable values.
- XOtherwise, it sets the named
- X.IR variable .
- XArguments are of the form \*Qvariable=value\*U (whitespace is allowed).
- XBoolean options such as
- X.I autoedit
- Xneed not have \*Q=value\*U associated in the command.
- XMultivalued variables are set in the same way as other variables, and
- Xthe list of values should be enclosed in quotes if whitespace is used
- Xto separate the items.
- XSee the VARIABLES section for details of the format of each type of variable.
- X.sp
- XThe special command
- X.sp
- X.ti +2
- Xset ?all
- X.sp
- Xwill print all known variables utilized by the program and a brief
- Xdescription of what they do.
- XThe user may set and manipulate his own set of variables, but internal
- Xvariables that are utilized by the program are the only ones displayed.
- X.sp
- XThe command
- X.sp
- X.ti +2
- Xset ?variable_name
- X.sp
- Xwill print the same information for one variable instead of all variables.
- XYou may unset everything by issuing the command \*Qunset *\*U.
- X.sp
- XIt is possible to set a variable to a list of messages returned by another
- Xcommand by using the piping mechanism. For example,
- X.sp
- X.ti +2
- Xpick \-s Status Reports | set reports
- X.sp
- XThe variable
- X.I reports
- Xnow contains a message list which can be used
- Xas the message list argument to any command which accepts a list.
- X.sp
- X.ti +2
- Xmail \-i $reports boss
- X.sp
- XThis command will mail to \*Qboss\*U and include the text of all the
- Xmessages held in the \fIreports\fP variable.
- X.TP
- X.BR sh " [command]"
- XInvokes an interactive version of the shell.
- XThe shell spawned is described by the variable
- X.BR shell .
- XIf the optional argument
- X.I command
- Xis given, then that command is executed under the Bourne Shell.
- XIf the special character `&' is at the end of any shell command,
- Xthen the command will be executed in background.
- X.TP
- X.BR source " [file]"
- XRead
- X.I Mush
- Xcommands from a file.
- XIf no filename is specified, the files searched
- Xfor are .mushrc or .mailrc in the user's home directory.
- XIf the environment variable
- X.I MUSHRC
- Xor
- X.I MAILRC
- Xis set, then the file named by the variable is sourced instead.
- XIf a filename is given on the command line, that file is sourced.
- XSee the INITIALIZATION heading and the
- X.B home
- Xvariable descriptions for more information.
- X.TP
- X.BR sort " [\-i] [[\-r] \-a | \-d | \-l | \-R | \-s | \-S]"
- XThis command will sort messages according to author, date, status or subject
- X(with or without considering the \*QRe: \*U, in replied messages).
- XIn addition, the messages can be sorted in reverse order (same arguments).
- X.sp
- X.nf
- XOptions:
- X.in +2
- X.ta 1i
- X\-i ignore case in alphabetical sorts
- X\-r reverse sort order of next option
- X\-a sort by author (alphabetical)
- X\-d sort by date
- X\-l sort by length of message
- X\-R sort by subject including \*QRe:\*U
- X\-s sort by subject (alphabetical)
- X\-S sort by message status
- X.in -2
- X.fi
- X.sp
- XBy default (no arguments),
- X.B sort
- Xsorts messages by
- X.IR status .
- XNew, unread messages are first, followed by preserved messages,
- Xand finally deleted messages are placed at the end of the list.
- XIf \-r is the only option given, the status ordering is reversed.
- X.sp
- XWhen sorting by date, the boolean variable
- X.B date_received
- Xis checked. If it is set, then sorting goes by date received.
- XOtherwise (default), sorting is by date sent by the original author.
- X.sp
- XIf more than one sort option is specified, they will be applied in
- Xleft-to-right sequence to each comparison.
- XThus:
- X.sp
- X.ti +2
- Xsort \-a \-d
- X.sp
- Xsorts messages by author and, if the author of any set of messages
- Xis the same, sorts within that set by date.
- XNote that the \-r option applies to only one other option at a time;
- Xto reverse the sort of both author and date requires:
- X.sp
- X.ti +2
- Xsort \-r \-a \-r \-d
- X.sp
- XThe options can also be grouped:
- X.sp
- X.ti +2
- Xsort \-ra \-rd
- X.ti +2
- Xsort \-rard
- X.sp
- XCurrently, only the line mode interface supports multiple sort criteria,
- Xbut the other interfaces allow subsorting indirectly
- Xwhen appropriate actions are taken, as discussed below.
- X.sp
- XIt is also possible to sort a consecutive sublist of messages by using pipes.
- END_OF_FILE
- if test 50595 -ne `wc -c <'mush/mush.1.b'`; then
- echo shar: \"'mush/mush.1.b'\" unpacked with wrong size!
- fi
- # end of 'mush/mush.1.b'
- fi
- echo shar: End of archive 3 \(of 19\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 19 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-
-