home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MUSHP71.ZIP / MUSH.DOC < prev    next >
Text File  |  1990-12-21  |  238KB  |  5,743 lines

  1.  
  2.  
  3.  
  4.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5.  
  6.  
  7.  
  8.      NAME
  9.           The Mail User's Shell - Shell for electronic mail.
  10.  
  11.      SYNOPSIS
  12.           mush [ -n ] [ -v ] [ -s subject ] [ -c cc-list ] [ -b bcc-
  13.           list ] [ address-list ]
  14.           mush [ -n ] [ -v ] [ -U[!]  ] -h draft-file
  15.           mush [ mode-options ] [ file-options ]
  16.  
  17.      INTRODUCTION
  18.           The Mail User's Shell (Mush) is an interface for sending and
  19.           manipulating a database of electronic mail messages under
  20.           the UNIX(TM) environment.  There are three user interfaces
  21.           that allow the user to interact with Mush. The default
  22.           interface is the conventional tty-based line mode similar to
  23.           command line interpreters such as csh as well as other
  24.           mailers, such as University of California, Berkeley's Mail
  25.           and Bell Lab's System V mailx interface.  This mode requires
  26.           nothing from the terminal in terms of screen capability and
  27.           may be run on many different versions of the UNIX(TM)
  28.           operating system.
  29.  
  30.           The text-graphics (curses) interface is reminiscent of the
  31.           vi visual editor, but is user-configurable to simulate other
  32.           editors.  This interface does not require graphics
  33.           capabilities of the computer or the terminal on which it is
  34.           run, but the terminal must have the minimum capabilities
  35.           required by any visual screen editor.
  36.  
  37.           The window interface for the Sun Workstation utilizes the
  38.           icon and menu based (mouse selectable) windowing system.
  39.           This tool (graphics) mode is highly subject to the version
  40.           of operating system your Sun may be running.  It is intended
  41.           to be run on Sun versions 3.5 and higher (those that have
  42.           the SunView window system).
  43.  
  44.           See the corresponding sections for more information on the
  45.           user interface desired.  Most of this manual deals with
  46.           commands, variables and actions that are common to all three
  47.           interfaces although some attention is paid to individual
  48.           characteristics of each interface.
  49.  
  50.           The following command line arguments are understood by Mush
  51.           (full word forms in parentheses):
  52.  
  53.           -b bcc-list
  54.                (-blindcarbon, -blind) The list of Blind Carbon Copy
  55.                recipients is set on the command line.  If more than
  56.                one address or an address containing spaces is
  57.                specified, the entire list should be enclosed in
  58.                quotes.  This option applies when sending mail only.
  59.                If you are entering the shell, curses mode, or the tool
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 12/21/90)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  71.  
  72.  
  73.  
  74.                mode, this option is ignored.
  75.  
  76.           -C   (-curses) Enter the mailer in curses mode upon startup.
  77.  
  78.           -c cc-list
  79.                (-carbon, -copy) The list of Carbon Copy recipients is
  80.                set on the command line.  If more than one address or
  81.                an address containing spaces is specified, the entire
  82.                list should be enclosed in quotes.  This option applies
  83.                when sending mail only.  If you are entering the shell,
  84.                curses mode, or the tool mode, this option is ignored.
  85.  
  86.           -d   (-debug) Turns on the debugging level to 1.  You can
  87.                change debugging levels from within the shell using the
  88.                debug command.
  89.  
  90.           -e   (-echo) Normally, the program runs with the local echo
  91.                off and each character typed is processed individually
  92.                so as to process certain macros and keyboard mappings.
  93.                This option will suppress this from taking place and
  94.                the program will only process input after a carriage
  95.                return has been hit.  Under normal circumstances, this
  96.                action is transparent to the user and the use of this
  97.                option is discouraged except when using a debugger with
  98.                the program.  Note that if this option is specified,
  99.                any key sequence set by map or map! will not take
  100.                place.  This option is ignored for curses mode.
  101.  
  102.           -F[!] filename
  103.                (-source) This file is the same type as the
  104.                initialization file read on startup (see
  105.                INITIALIZATION) with the exception that commands that
  106.                manipulate or search messages may be given.  Normally,
  107.                such commands may not appear in the initialization file
  108.                since that file is read before the folder is scanned.
  109.                The file specified by -F is read after the folder is
  110.                scanned, so commands that affect messages are allowed.
  111.                The optional `!' argument prevents the shell from
  112.                running after the file has been sourced.  Otherwise,
  113.                Mush continues into whatever interface has been
  114.                specified.
  115.  
  116.           -f [ filename ]
  117.                (-folder) The optional filename argument specifies a
  118.                folder containing mail messages.  With no argument,
  119.                mbox in the current directory (or the variable mbox) is
  120.                used.  If no filename is given, this option must be
  121.                last on the command line.
  122.  
  123.           -H[:c]
  124.                (-headers) Have Mush display mail headers without
  125.                entering the shell.  See the headers command for
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 12/21/90)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  137.  
  138.  
  139.  
  140.                information on the :c argument.  No colon modifier is
  141.                equivalent to "-H:a".  This option prevents the shell
  142.                from running, so this option will turn off the -S and
  143.                -C flags.  This option is ignored if the tool mode is
  144.                in effect.
  145.  
  146.           -h draft-file
  147.                (-draft) This option specifies a previously prepared
  148.                message file (called a draft) which will be read in as
  149.                a new message to be sent.  The current implementation
  150.                requires that the draft file must contain all the
  151.                message headers; Mush will add only a new "Date:" and a
  152.                "From:" header if there is none.  If there is no "To:"
  153.                header, the draft will not be sent.  See the mail
  154.                command and the section on "Sending mail" for more
  155.                information.
  156.  
  157.           -I[!] filename
  158.                (-init) This option specifies an initialization file to
  159.                be read before any of the other Mush initialization is
  160.                done.  The file specified by -I is read before the
  161.                default system initialization file is read (see the
  162.                INITIALIZATION section for details).  The optional `!'
  163.                argument prevents Mush from reading the default system
  164.                file, so -I! can be used to specify a substitute
  165.                default file.  The user's personal initialization file
  166.                is read normally.
  167.  
  168.           -i   (-interact) Forces interactive mode even if input has
  169.                been redirected to the program.  This is intended for
  170.                remote host mail sessions (with -e) but also allows the
  171.                user to redirect input from a "script" of Mush
  172.                commands.  See the INITIALIZATION and MUSH SCRIPTS
  173.                sections for information on how to write scripts that
  174.                deal with mail.  Note that this flag is different from
  175.                the "ignore" flag of UCB Mail.
  176.  
  177.           -m mailbox-path
  178.                (-mailbox) The mailbox specified will be interpreted as
  179.                if it were the user's main (system) mailbox in place of
  180.                /usr/spool/mail/$USER (or whatever path is applicable
  181.                for your system and Mail Transport Agent).
  182.  
  183.           -N   (-noheaders) Enter Mush without displaying any message
  184.                headers.  This argument is passed to the folder
  185.                command.
  186.  
  187.           -n[!]
  188.                (-noinit) No initialization is done on start up.  That
  189.                is, do not source the default system initialization
  190.                files.  If the `!' argument is given, reading of the
  191.                user's personal .mushrc or .mailrc files is also
  192.  
  193.  
  194.  
  195.      Page 3                                         (printed 12/21/90)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  203.  
  204.  
  205.  
  206.                suppressed.  See the INITIALIZATION section for more
  207.                information on startup and the significance of these
  208.                files.
  209.  
  210.           -r   (-readonly) Initialize the folder in Read-Only mode; no
  211.                modification of the folder is permitted.  This argument
  212.                is passed on to the folder command.
  213.  
  214.           -S   (-shell) This flag allows the user to enter the shell
  215.                even if the system mailbox or specified folder is empty
  216.                or doesn't exist.
  217.  
  218.           -s subject
  219.                (-subject) The subject is set on the command line using
  220.                this flag.  If the subject has any spaces or tabs, the
  221.                entire subject should be enclosed in quotes.  This
  222.                applies when sending mail only.  If you are entering
  223.                the shell, curses mode, or the tool mode, this option
  224.                is ignored.
  225.  
  226.           -T timeout
  227.                (-timeout) In the tool mode (Sun only), timeout
  228.                specifies the length of time (seconds) to wait between
  229.                each check for new mail.  30 seconds is the smallest
  230.                time allowed for performance reasons; 60 seconds is the
  231.                default value.  This option should be used either in
  232.                place of -t or immediately after it.
  233.  
  234.           -t   (-tool) Use the graphics tool mode (Sun only).  This
  235.                option must be the first one on the command line,
  236.                before any Sun window system flags or other Mush
  237.                options.
  238.  
  239.                NOTE:  The -t option is obsolete and may be eliminated
  240.                in future revisions.  The preferred way to run the tool
  241.                mode of Mush is to use the command mushtool, which is a
  242.                link to mush.
  243.  
  244.           -u [ user ]
  245.                (-user) The mailbox to use is /usr/spool/mail/user.  If
  246.                the login name for user is not specified, then root is
  247.                used.
  248.  
  249.           -U[!]
  250.                (-send) This option may be used only with -h (-draft).
  251.                It causes the draft file to be sent immediately without
  252.                further editing ("unedited", hence -U).  If the
  253.                optional `!' is appended, signatures and fortunes are
  254.                suppressed.  See the mail command and the section on
  255.                "Sending mail" for more information.
  256.  
  257.           -v   (-verbose) Verbose mode is turned on.  This option is
  258.  
  259.  
  260.  
  261.      Page 4                                         (printed 12/21/90)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  269.  
  270.  
  271.  
  272.                passed to the actual mail delivery subsystem internal
  273.                to your version of UNIX(TM).  Some mailers do not have
  274.                a verbose option, so this flag may not apply to your
  275.                system (System V, for example).  This applies when
  276.                sending mail only.  If you are entering the shell,
  277.                curses mode, or the tool mode, this option is ignored.
  278.  
  279.      GENERAL USAGE
  280.           Because there are three different interfaces available to
  281.           the user, the tty characteristics (backspace, kill-word,
  282.           kill-line, redraw line) are simulated identically in all
  283.           interfaces.  When the user has to type something, the 4.2BSD
  284.           style of tty driver interface is simulated whether you're in
  285.           the window system, the curses mode, or the tty-line mode,
  286.           and even on System-V machines.  This means that backspacing
  287.           causes a backspace-space-backspace effect (erasing the
  288.           character backspaced over).  The user may reset his tty
  289.           characteristics using the stty command.
  290.  
  291.           New mail.
  292.  
  293.           If during a Mush session, new mail arrives for you, it is
  294.           automatically incorporated into your system mailbox and you
  295.           are told that new mail has arrived.
  296.  
  297.           In the default line mode, new mail is checked between each
  298.           command issued.  In the curses mode, new mail is checked on
  299.           each command and is displayed in the bottom line of the
  300.           screen.  In the tool based graphics mode, new mail is
  301.           checked approximately every minute or the number of seconds
  302.           specified by the -T option on the command line.
  303.  
  304.           If you are using your system mailbox as your "current
  305.           folder," then the new mail is added immediately to your
  306.           current list of messages and information similar to the
  307.           following example is displayed, to tell you whom the mail is
  308.           from:
  309.  
  310.             New mail: (#15) argv@zipcode.com (Dan Heller)
  311.  
  312.           If you are not in your system mailbox, then the new mail
  313.           will not be added to your list of messages, but you will
  314.           instead be informed of the new arrival.
  315.  
  316.           If you are using the tool based mode and Mush is closed to
  317.           an iconic state, then the number of messages in the current
  318.           folder is displayed on the mailbox icon and the flag on the
  319.           mailbox will go up.
  320.  
  321.           Displaying messages.
  322.  
  323.           Depending on the interface you use, you can display any
  324.  
  325.  
  326.  
  327.      Page 5                                         (printed 12/21/90)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  335.  
  336.  
  337.  
  338.           message in your list of messages as long as the message is
  339.           not marked for deletion.  If the message is marked as
  340.           deleted, then use the undelete command supplied by the
  341.           interface you are using.  To display a message in line mode,
  342.           specify the message using print, type, p, t, or type a
  343.           message number to display that message on the screen.
  344.  
  345.           In curses mode, move the cursor over the message you want
  346.           and type a `t' or `p' to read the message.  You may "bind"
  347.           other keys to call the function that displays messages if
  348.           `t' and `p' are uncomfortable.
  349.  
  350.           In the tool mode, move the cursor over the header summary of
  351.           the message you wish to be displayed and select the LEFT
  352.           mouse button.  The MIDDLE mouse button will delete the
  353.           message, and the RIGHT button will bring up a menu of
  354.           additional options, including help.  If the message you want
  355.           is not visible (in the header subwindow), you may type the
  356.           number of the message in the "Range:" item, and press
  357.           return.  That message number will be displayed.  Finally,
  358.           the "Next" item in the panel below the header display can be
  359.           used to step through the folder, one message at a time.
  360.  
  361.           In the line or curses mode, if the message has more lines
  362.           than the variable crt, then a pager will be invoked to allow
  363.           the user to page through the message without having it
  364.           scroll off the screen.  The pager used is determined by the
  365.           variable pager.  If that variable is unset, then a default
  366.           pager will be used.  Note that if pager is set, but not to a
  367.           value, or is set to the value of "internal", then the
  368.           internal pager is used.  The internal pager is very simple;
  369.           the spacebar displays the next crt lines, carriage return
  370.           prints the next line, and "q" quits the pager.
  371.  
  372.           In the tool mode, if a message is larger than the size of
  373.           the message subwindow, the scrollbar at the left side of the
  374.           window may be used to page the message forwards and
  375.           backwards.  The variable crt_win may be set in an
  376.           initialization file to preset the size of the message
  377.           display subwindow.
  378.  
  379.           An alternative to displaying messages is the top command.
  380.           This command will print just the top few lines of a message.
  381.           The number of lines is determined by the variable toplines.
  382.           If this variable isn't set, top will print a number of lines
  383.           equal to the value of the variable crt.
  384.  
  385.           Sorting mail.
  386.  
  387.           Mush allows you to sort your mail according to various
  388.           constraints such as time, size, status (new, unread,
  389.           deleted, etc.), author and subject.  See the sort command in
  390.  
  391.  
  392.  
  393.      Page 6                                         (printed 12/21/90)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  401.  
  402.  
  403.  
  404.           the COMMANDS section for more information on sorting.
  405.           Sorting has a panel item in the tool mode, and is bound by
  406.           default to the `o' (sort) and `O' (sort reverse) keys in
  407.           curses mode.
  408.  
  409.           Picking specific messages.
  410.  
  411.           You can select messages that contain unique information, or
  412.           from messages that have special attributes.  You have the
  413.           option of restricting your search to messages between dates,
  414.           message numbers, author names and other constraints.  See
  415.           the pick command in the COMMANDS section for complete
  416.           details.  This feature is not directly accessible from the
  417.           tool mode, and is available only as a search action in
  418.           curses mode (see, however, the CURSES INTERFACE section for
  419.           temporary escapes to line mode).
  420.  
  421.           Sending mail.
  422.  
  423.           You can send mail by listing addresses on the command line
  424.           when Mush is started, by using the mail command from within
  425.           Mush, or by responding to other mail.  In curses mode, the
  426.           `m' key invokes mail, and the `r' key begins a response.  In
  427.           the tool mode, selecting the "Compose" or "Reply" items on
  428.           the main panel will open a separate frame for message
  429.           composition.  The message replied-to is either the current
  430.           message or one specified in the "Range:" item.
  431.  
  432.           When you are sending mail, you are in a mode where
  433.           everything you type is added to the contents of the message.
  434.           When you are done typing your message in line or curses
  435.           modes, you can type `^D' (control-D) to signify the end of
  436.           the message.  If you have the variable dot set, then you can
  437.           end a message with a `.' on a line by itself.  In the tool
  438.           mode, select the "Send" item in the composition frame to
  439.           finish and send the message.
  440.  
  441.           While you are composing a message, Mush treats lines
  442.           beginning with the character `~' specially.  This is called
  443.           a tilde escape.  For instance, typing "~i" (alone on a line)
  444.           will place a copy of the "current message" into your message
  445.           body.  It will not include the message headers of the
  446.           message, just the body of text that comprises the message.
  447.           A subset of these escapes are available in the tool mode,
  448.           and others are provided as panel items or as menu selections
  449.           from the "Include" item.  Tilde escapes which alter message
  450.           headers are not usable when the variable edit_hdrs is set or
  451.           when the -E option was passed to the mail command.
  452.  
  453.           The tool mode composition window uses header editing at all
  454.           times, but provides some of these escapes anyway; see the
  455.           descriptions below, and the description of the edit_hdrs
  456.  
  457.  
  458.  
  459.      Page 7                                         (printed 12/21/90)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  467.  
  468.  
  469.  
  470.           variable, for complete details.
  471.  
  472.           Available tilde escapes:  [OPTIONAL arguments in square
  473.           brackets]
  474.  
  475.           ~a file
  476.                Append message buffer to file name.  Accessed via the
  477.                "Export" panel item in tool mode.
  478.  
  479.           ~b [bcc-list]
  480.                Modify blind carbon recipients; otherwise identical to
  481.                ~t.  In tool mode, moves the cursor to the Bcc: header,
  482.                adding one if necessary.
  483.  
  484.           ~c [cc-list]
  485.                Modify carbon copy recipients; otherwise identical to
  486.                ~t.  In tool mode, moves the cursor to the Cc: header,
  487.                adding one if necessary.
  488.  
  489.           ~E[!]
  490.                Erase message buffer; not available in tool mode.
  491.                Saves the contents of the letter to "dead.letter"
  492.                (unless the `!' is specified) and then clears the
  493.                message buffer; the user remains in editing mode.  If
  494.                the variable nosave is set, then `!' need not be
  495.                specified.
  496.  
  497.           ~e [editor]
  498.                Enter the editor.  Defaults to variable editor,
  499.                environment EDITOR, or vi, except in tool mode, where
  500.                ~e is equivalent to ~v.
  501.  
  502.           ~F[!]
  503.                Add a fortune [don't add] at end of message.  Accessed
  504.                via the "Fortune" panel item in tool mode.
  505.  
  506.           ~f [msg-list]
  507.                Forward mail.  The included messages are not indented,
  508.                but are marked as "forwarded mail".  Accessed via the
  509.                "Include" panel item in tool mode.
  510.  
  511.           ~h   Modify all message headers.  Each header is displayed
  512.                one by one and each may be edited.  In tool mode, moves
  513.                to the To: header; typing a carriage return will
  514.                advance the input cursor to each of the other headers
  515.                in turn.  The mouse cursor will change to a "bent
  516.                arrow" when automatic input cursor advance is active.
  517.  
  518.           ~I [msg-list]
  519.                Same as ~i, but also include the message headers.
  520.                Accessed via the "Include" panel item in tool mode.
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                                         (printed 12/21/90)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  533.  
  534.  
  535.  
  536.           ~i [msg-list]
  537.                Include the body of the current message (or listed
  538.                messages).  Accessed via the "Include" panel item in
  539.                tool mode.  See the descriptions of the variables
  540.                indent_str, pre_indent_str, and post_indent_str.
  541.  
  542.           ~p [pager]
  543.                Page the message body; not available in tool mode.
  544.                Defaults to variable pager, environment PAGER, or the
  545.                default pager set up by the system administrator.  This
  546.                may be the internal pager.
  547.  
  548.           ~q   Quit message; save in ~/dead.letter if nosave is not
  549.                set.  Not available in tool mode.
  550.  
  551.           ~r file
  552.                Read filename into message buffer.  Accessed via the
  553.                "Import" panel item in tool mode.
  554.  
  555.           ~S[!]
  556.                Include [don't include] signature at end of message.
  557.                The variables autosign and autosign2 describe the file
  558.                or string to append to the message.  See the VARIABLES
  559.                section for more information on these variables.
  560.                Accessed via the "Autosign" panel item in tool mode.
  561.  
  562.           ~s [subject]
  563.                Modify the subject header.  In tool mode, moves to the
  564.                Subject: header, adding one if necessary.  In other
  565.                modes, if an argument is given (a new subject), then
  566.                the subject line is replaced by the new subject line.
  567.                If none is given, then the subject line is displayed
  568.                for editing just as in the ~t command.
  569.  
  570.           ~t [list]
  571.                Change list of recipients ("To" list).  In tool mode,
  572.                moves the cursor to the To: header.  In other modes, if
  573.                a list is given, this list is appended to the current
  574.                list.  If no list is given, then the current list is
  575.                displayed and the cursor placed at the end of the list.
  576.                You can backspace over the stuff in the list or you can
  577.                append more addresses onto the end of the list as
  578.                desired.
  579.  
  580.           ~u   Up one line; not available in tool mode.  If the user
  581.                made a mistake typing a letter and he has already hit
  582.                carriage return, he may avoid entering the editor and
  583.                edit the previous line using ~u.  The line is retyped
  584.                and the cursor is placed at the end allowing the user
  585.                to backspace over it and retype the line.  System-V
  586.                users should note that if the new line is shorter than
  587.                it was before the ~u command, the line is padded with
  588.  
  589.  
  590.  
  591.      Page 9                                         (printed 12/21/90)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  599.  
  600.  
  601.  
  602.                blanks to the previous length of the file.
  603.  
  604.           ~v [editor]
  605.                Enter the visual editor; works in tool mode.  Also
  606.                accessible through the "Edit" button in tool mode.
  607.                Defaults to variable visual, environment VISUAL, or vi.
  608.  
  609.           ~w file
  610.                Write message buffer to the indicated file.  Accessible
  611.                in tool mode via the "Export" panel item.  When the
  612.                header editing is in use (the variable edit_hdrs or the
  613.                -E option of mail), this tilde-command can be used to
  614.                create a draft file.  Draft files are partially
  615.                completed letters that you wish to save for editing and
  616.                eventually sending later.  See the mail command for a
  617.                description of rereading and sending drafts.
  618.  
  619.           ~x   Exit message; don't save in dead.letter.  Accessible in
  620.                tool mode via the "Abort" panel item.
  621.  
  622.           ~$variable
  623.                Insert the string value for variable into message; not
  624.                available in tool mode.  If a boolean variable is
  625.                listed, nothing is appended regardless of its value.
  626.  
  627.           ~:command
  628.                Run the Mush command specified by "command"; not
  629.                available in tool mode.  You may not run any command
  630.                that sends mail.  It is inadvisable to change folders
  631.                at this time since the current message list may be
  632.                corrupted, but the action is allowed nonetheless to
  633.                provide flexibility for experienced users.
  634.  
  635.           ~~   A line beginning with two escape characters will be
  636.                unaffected by Mush except that only a single tilde will
  637.                be inserted into the letter.
  638.  
  639.           The variable escape may be set to describe a character other
  640.           than `~' to be used as the escape character.  However, tilde
  641.           escapes are normally NOT interpreted when Mush is started
  642.           with redirected input.  If tilde-interpretation is desired,
  643.           use the -i option when starting mush.
  644.  
  645.           Mail Aliases.
  646.  
  647.           Mail aliases are shorthand names for long mail addresses.
  648.           These are supported in the same manner as UCB Mail supports
  649.           them.  Because Mush has command line history reminiscent of
  650.           csh, commands that use UUCP's `!' character for user-host
  651.           and host-host separation should be escaped (preceded by a
  652.           backslash).  This is not necessary in the initialization
  653.           file (.mushrc) because history referencing is ignored while
  654.  
  655.  
  656.  
  657.      Page 10                                        (printed 12/21/90)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  665.  
  666.  
  667.  
  668.           these files are being sourced.  See the INITIALIZATION and
  669.           LINE-MODE INTERFACE sections for more information on
  670.           initialization file format and the history mechanism.
  671.  
  672.           Aliases reference normal mailing addresses as well as other
  673.           aliases.  If a loop is detected, then the user will be
  674.           notified and the message will be forced into the file
  675.           dead.letter in the user's home directory.  The unalias
  676.           command is used to reverse the effects of the alias command.
  677.           From the tool mode, aliases can be set and unset in an
  678.           aliases subwindow.  Press the RIGHT mouse button on the
  679.           "Options" item in the main frame, and select "Aliases" from
  680.           the menu.
  681.  
  682.           Help.
  683.  
  684.           Mush was designed so that each command or action should not
  685.           be a mystery.  Helping the user understand what to do and
  686.           how to do whatever he wishes is the goal behind the help
  687.           facility.  For this reason, the help command gives
  688.           information on both general usage and a few specific help
  689.           categories.
  690.  
  691.           In text mode, most help is gotten by typing -? as an
  692.           argument to a command.  Almost every command has the -?
  693.           option.  When this option is specified, most commands will
  694.           attempt to read from a help file a brief explanation of the
  695.           functionality of the command.  If necessary, a pointer to
  696.           other sources of information will be given to fully explain
  697.           a concept.
  698.  
  699.           In line mode, typing `?' as a command will display a list of
  700.           possible commands.  In the curses mode, the `?' key will
  701.           display help message, which explains how to obtain a list of
  702.           the current key-to-command bindings; a keystroke or set of
  703.           keystrokes correspond directly to a command.
  704.  
  705.           In the tool mode, this is also available, but more extensive
  706.           help is provided in the pop-up menus.  Press the RIGHT mouse
  707.           button (the "menu button") when pointing to any panel button
  708.           and a number of items will appear in a menu.  The last
  709.           command in the menu list will often be one labelled "help".
  710.           If a button does not have a menu or has no help item, check
  711.           the menu of the "Help" button for related topics.  Selecting
  712.           any help item will open a new scrollable window with help
  713.           text.  Note:  The limited number of file descriptors in
  714.           SunOS 3.5 forces Mush to display help information in the
  715.           message window in the main frame.
  716.  
  717.      INITIALIZATION
  718.           After the command line arguments have been interpreted Mush
  719.           will read commands from one or more initialization files
  720.  
  721.  
  722.  
  723.      Page 11                                        (printed 12/21/90)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  731.  
  732.  
  733.  
  734.           that (typically) set variable values, aliases, command line
  735.           aliases, and so forth.  Any file specified by the -I option
  736.           is read first.  Next, if neither -I! nor -n was given, a
  737.           default system initialization file is read.  The system
  738.           default file is set up by the system administrator and may
  739.           contain commands that should be set system-wide.  Finally,
  740.           if -n! was not given, Mush reads the user's personal
  741.           initialization file.
  742.  
  743.           The user's file is determined by first looking for the
  744.           environment variables MUSHRC or MAILRC.  If neither of those
  745.           environment variables is set, then the file .mushrc is
  746.           searched for in the home directory of the user.  If that
  747.           file cannot be found, Mush will attempt to read the file
  748.           .mailrc from the same directory.  Finally, if that file
  749.           cannot be read, no initialization is done and the default
  750.           values will be in effect.
  751.  
  752.           If the user has no home directory, or permissions prevent
  753.           read/write access to $HOME, /tmp is used as the home
  754.           directory.  See the home variable under the VARIABLES
  755.           section.
  756.  
  757.           Once in the shell, the source command may be used to specify
  758.           a file if you want to read commands from a file other than
  759.           the default.  The command saveopts will save all variable
  760.           settings, aliases, and all other Mush settable attributes,
  761.           to aid in creating an initialization file.  If no filename
  762.           is given on the command line, the source and saveopts
  763.           commands choose a file in the manner described above.
  764.           Saveopts will not overwrite the file if it exists.  In such
  765.           cases, you will be prompted to confirm overwrite.  If you
  766.           confirm overwriting the existing file, remember that
  767.           existing "if" expressions or other manually entered comments
  768.           or non variable-setting type commands that previously
  769.           existed in the file will be lost.
  770.  
  771.           No interactive commands should be called from any
  772.           initialization file.  These commands are not prevented
  773.           because it is impossible to trace which commands are
  774.           actually UNIX(TM) commands that will be interactive.  The
  775.           responsibility of not running interactive commands is left
  776.           to the user.  Because the initialization file is read before
  777.           any messages are read into the program, message filtering
  778.           commands should not be placed in this file unless you know
  779.           you're going to re-source the file later as a command.
  780.  
  781.           Initialization File Format.  When reading the initialization
  782.           file, Mush will recognize the `#' character as a comment
  783.           character.  It may be anywhere on a line in the file.  When
  784.           that character is encountered, processing of that line is
  785.           discontinued to the end of the line.  If the `#' is enclosed
  786.  
  787.  
  788.  
  789.      Page 12                                        (printed 12/21/90)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  797.  
  798.  
  799.  
  800.           in quotes (single or double), then it is not considered a
  801.           comment.  Examples:
  802.  
  803.             set shell = /bin/csh  # set the shell variable
  804.             # this entire line has been commented out.
  805.             set prompt = "Message #%m: "  # The `#' is within quotes
  806.  
  807.           The exit command has special meaning in the initialization
  808.           file.  If the command is found, Mush will not exit, but
  809.           rather, discontinue reading from the file immediately.
  810.  
  811.           There may be "if" expressions within the initialization file
  812.           to determine certain runtime states of Mush.  No parentheses
  813.           are allowed and only one boolean expression may be evaluated
  814.           per line; that is, no "&&" or "||" may be used in
  815.           expressions.  An "else" on a line by itself may precede
  816.           alternative actions.  "If" expressions may be nested to any
  817.           reasonable depth, but there must always be an "endif"
  818.           matching each "if" expression.  The statements associated
  819.           with an "if" expression are never on the same line with the
  820.           conditional expression.
  821.  
  822.           Conditional expressions understood include the internal
  823.           variables istool, iscurses, is_shell, hdrs_only, is_sending,
  824.           and redirect.  These are internal variables whose values
  825.           cannot be referenced using the "$variable" method of
  826.           variable expansion.  If istool is true, the program is going
  827.           to run in the tool mode.  If iscurses is true, the program
  828.           is in or is going to run in the curses mode even though the
  829.           screen package may not yet have been started.  If is_shell
  830.           is true, then Mush has entered the shell; is_shell is always
  831.           false at startup when initialization files are read, and is
  832.           always true when files are sourced after initialization with
  833.           the source command or the -F option.
  834.  
  835.           If hdrs_only is true, then the -H flag on the command line
  836.           has been given.  If is_sending is true, then the user is
  837.           sending mail to another user.  This does not imply that the
  838.           user is not going to be running a shell after the mail is
  839.           sent.  If redirect is true, then input to the program is
  840.           redirected.  The test for redirection tells whether input,
  841.           not output, has been redirected to the program.  The -i
  842.           option on the command line is required to run the shell if
  843.           redirect is on.  If -i is specified, the value for redirect
  844.           will be set to false.  Note that any time Mush runs when not
  845.           connected to a terminal, it will believe that input has been
  846.           redirected.  See the MUSH SCRIPTS section for more details.
  847.  
  848.           The `!' operator may be used to negate expressions, thus,
  849.  
  850.             if !istool
  851.                 exit
  852.  
  853.  
  854.  
  855.      Page 13                                        (printed 12/21/90)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  863.  
  864.  
  865.  
  866.             else
  867.                 set autoprint
  868.             endif
  869.  
  870.           means that if you are not running as a tool, stop reading
  871.           commands from this file.  Otherwise, set the autoprint
  872.           variable.
  873.  
  874.             set hdr_format = "%25f %7d (%l/%c) %25s"
  875.             if hdrs_only
  876.                 exit
  877.             endif
  878.  
  879.           This tells the program to set the hdr_format variable and
  880.           check to see if we're running the program to read headers
  881.           only.  If so, stop reading this file (exit) and continue on
  882.           with the program.  This speeds up runtime quite a bit for
  883.           those who have lengthy initialization files, because no
  884.           other shell variables are necessary.
  885.  
  886.             if !iscurses
  887.                 set crt = 24 screen = 18
  888.             endif
  889.  
  890.           This segment checks to see that we're not running in curses
  891.           mode, and if not it will set our crt and screen sizes.  This
  892.           is mostly because the curses mode will set those values for
  893.           us by looking at the size of the screen.  See the CURSES
  894.           INTERFACE section for configuring your environment so you
  895.           enter curses mode each time you run the shell.
  896.  
  897.           String evaluation is allowed in "if" expressions, and the
  898.           operators "==" and "!=" may be used to determine equality or
  899.           inequality, and "=~" and "!~" may be used for pattern-
  900.           matching.  Usually, variables are compared with constants
  901.           for evaluation.
  902.  
  903.           Note that it is not possible to compare variables to an
  904.           empty string, and variables that evaluate to an empty string
  905.           may cause errors.  It is possible to test whether a variable
  906.           is set by using the syntax "$?variable" (as in csh) but
  907.           there is not currently any way to test for an empty string
  908.           value.
  909.  
  910.             if $TERM == adm3a
  911.                 set pager = more
  912.             else
  913.                 set pager = less
  914.             endif
  915.  
  916.           This segment tests to see if the user's terminal type is
  917.           "adm3a".  If it is, then it sets the pager variable to be
  918.  
  919.  
  920.  
  921.      Page 14                                        (printed 12/21/90)
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  929.  
  930.  
  931.  
  932.           the more program.  Note that the variable TERM will be
  933.           gotten from the user's environment if a shell variable is
  934.           not set already.  Otherwise, the pager variable is set to
  935.           "less".  This exemplifies the fact that less frequently
  936.           fails to function correctly for the terminal type "adm3a" so
  937.           we don't use it.
  938.  
  939.           Also supported in "if" expressions are the test flags "-e"
  940.           and "-z".  These flags test to see if a file exists ("-e")
  941.           or if it is zero-length ("-z").  These are most useful in
  942.           command files that are to be read after the shell has
  943.           started; see the examples in the MUSH SCRIPTS section.
  944.  
  945.           After sourcing the initialization file, Mush reads all the
  946.           mail out of the specified folder (the system spool directory
  947.           if no folder is given) and creates a list of messages.  The
  948.           current maximum number of messages the user can load is set
  949.           to 1000 by default.  The system administrator who configures
  950.           the program can reset this value higher or lower if you ask
  951.           nicely.  If the user has the sort variable set, then when
  952.           the current folder's messages have all been read, the
  953.           messages are sorted according to the value of the variable
  954.           (see the sort entry under the VARIABLES heading for more
  955.           information).  Each message has a number of message header
  956.           lines that contain information about whom the mail is from,
  957.           the subject of the message, the date it was received, and
  958.           other information about the letter.  This information is
  959.           then compiled into a one-line summary for each message and
  960.           is printed out in an appropriate manner depending on the
  961.           interface you're using.
  962.  
  963.           At this point, commands may be input by the user.  Lengthy
  964.           or complex commands can be placed in a file and then
  965.           executed via the source command.  Such files use the same
  966.           format as the initialization files and may use all the same
  967.           tests in "if" expressions.  Sourcing of a file of filter
  968.           commands such as those in the example above can be automated
  969.           by using the -F option when Mush is started.  Also see the
  970.           MUSH SCRIPTS section for other uses.
  971.  
  972.      LINE-MODE INTERFACE
  973.           In the line-mode, the user is given a prompt to which
  974.           commands are issued and arguments are passed to commands.
  975.           When the user types at the prompt, each line is parsed and
  976.           words (or arguments) are separated into an array of strings.
  977.           This array, also called an argument vector, is then modified
  978.           by expanding history references, command line aliases, and
  979.           variable references.  A command line ends when the end of
  980.           the line is encountered or a pipe (|) or semicolon (;)
  981.           character is encountered, separating discrete commands.
  982.  
  983.           When a command line has been parsed and placed in an
  984.  
  985.  
  986.  
  987.      Page 15                                        (printed 12/21/90)
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  995.  
  996.  
  997.  
  998.           argument vector, the first argument in the vector (the
  999.           "command") is searched for in a list of legal Mush commands.
  1000.           If found, the function associated with that command is
  1001.           called and the rest of the line is passed to that function
  1002.           as command line arguments.
  1003.  
  1004.           Before commands are called, however, the input the user
  1005.           gives is preprocessed in a style reminiscent of the C-shell
  1006.           (csh).  Mush also supports a subset from each of the
  1007.           following aspects of csh:
  1008.             +o Command history.
  1009.             +o Command line aliasing.
  1010.             +o "Piping" mechanism to redirect "input" and "output" of
  1011.             commands.
  1012.             +o Filename metacharacters.
  1013.  
  1014.           Command history.
  1015.  
  1016.           Mush supports a history mechanism similar to that supplied
  1017.           by csh.  A subset of csh history modifiers are supported to
  1018.           reference previously issued commands and to extract
  1019.           specified arguments from these commands.
  1020.  
  1021.           The history mechanism remembers a list of past commands
  1022.           whose length is bounded by the value of the history
  1023.           variable.  If this variable is not set, only the most recent
  1024.           command is remembered.  To reference previously typed
  1025.           commands, the `!' character is used in the same manner as in
  1026.           csh.  There is a limited implementation of history
  1027.           modification; supported are the argument selectors that
  1028.           reference command line arguments and ":p" (echo, but don't
  1029.           execute the command).
  1030.  
  1031.           Examples:
  1032.             !-2:$   two commands ago, last argument.
  1033.             !3:2-4  the third command, arguments two through four.
  1034.             !!:p    print the last command in its entirety.
  1035.  
  1036.           During the sourcing of initialization files (.mushrc),
  1037.           history is not in effect and therefore the `!' character
  1038.           does not cause history expansion.  This includes startup of
  1039.           the program and when the command source is issued.  UUCP
  1040.           style addresses that contain the `!' character may be given
  1041.           in the initialization file without the need to be preceded
  1042.           by a backslash.  However, `!' does need to be escaped if
  1043.           cmd's are used to reference command line arguments.
  1044.  
  1045.           Command line aliasing.
  1046.  
  1047.           Command aliases are different from mail aliases in that they
  1048.           are used to expand to commands.  This feature enables
  1049.           command substitution similar to csh.  To be backwards
  1050.  
  1051.  
  1052.  
  1053.      Page 16                                        (printed 12/21/90)
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1061.  
  1062.  
  1063.  
  1064.           compatible with UCB Mail, the alias command is used for
  1065.           address aliasing.  Thus, the command cmd is introduced in
  1066.           place of alias.
  1067.  
  1068.           Examples:
  1069.             cmd d delete
  1070.             cmd t type
  1071.             cmd dt 'd ; t'
  1072.             cmd - previous
  1073.             cmd r 'reply \!* -e -i'
  1074.  
  1075.           In the last example, if the user types "r 5", Mush will
  1076.           reply to sender of the fifth message and pass all the other
  1077.           arguments along to the reply command.  Note the escaping of
  1078.           the `!' character.  This must also be done if set in the
  1079.           initialization file (.mushrc).  Had the user not specified a
  1080.           message number on the `r' command line, reply would respond
  1081.           to the "current message" rather than the fifth message.
  1082.  
  1083.           Piping commands.
  1084.  
  1085.           Mush commands can be "piped" to one another so as to provide
  1086.           output of one command to be used as input to the next
  1087.           command in the pipeline.  However, the output of commands is
  1088.           not the "text" that is returned (as it is in sh and csh),
  1089.           but instead is a message list of the messages that were
  1090.           affected.  A message list is defined as the set of messages
  1091.           that the user specifies in a command or the messages a
  1092.           command affects after it is through executing.  When one
  1093.           command is piped to another, the effect is that the second
  1094.           command will consider only those messages affected by the
  1095.           first command.  In most cases, Mush is smart enough to know
  1096.           when piping is occurring and may suppress text output that a
  1097.           command might produce.
  1098.  
  1099.           Examples:
  1100.  
  1101.             pick -f fred | save fred_mail
  1102.  
  1103.           This will find all the messages from "fred" and save them
  1104.           all in the file named fred_mail.
  1105.  
  1106.             lpr 4-8 | delete
  1107.  
  1108.           This will send messages 4, 5, 6, 7, and 8 to the printer and
  1109.           then delete them.
  1110.  
  1111.             headers :o | delete
  1112.  
  1113.           Deletes all old (already read) mail.
  1114.  
  1115.           Because action is taken on mail messages, not files,
  1116.  
  1117.  
  1118.  
  1119.      Page 17                                        (printed 12/21/90)
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1127.  
  1128.  
  1129.  
  1130.           metacharacters such as `*' and `?' are not expanded to file
  1131.           names as csh would do.  Instead, Mush commands take message
  1132.           lists as arguments (a list references one or messages) to
  1133.           take action upon.  When referencing message numbers, Mush
  1134.           understands the following special syntax:
  1135.  
  1136.             *       All messages
  1137.             ^       The first message
  1138.             $       The last message
  1139.             .     The current message
  1140.             N-M    A range of messages between N and M, inclusive
  1141.  
  1142.           In the last case, N and M may be * ^ $ . or digits
  1143.           referencing explicit message numbers.  The range must be in
  1144.           ascending order.
  1145.  
  1146.           You can also negate messages by placing the message list
  1147.           inside braces, `{' `}' -- thus, the expression "2-19 {11-
  1148.           14}" references messages 2 through 19 except for messages 11
  1149.           through 14.
  1150.  
  1151.           Note that message lists are parsed left to right.  Negated
  1152.           messages may be reset by turning them on again later in the
  1153.           argument list.  A common error new users make is to specify
  1154.           a negated list without specifying any beginning messages.
  1155.  
  1156.             delete { 6 }
  1157.  
  1158.           In this example, the user attempted to delete all messages
  1159.           except for number 6.  He should have specified `*'
  1160.           beforehand.  A correct example:
  1161.  
  1162.             preserve ^-. { 3 }
  1163.  
  1164.           Here, the user specifies a valid message list and causes
  1165.           Mush to preserve all messages from the beginning of the list
  1166.           (message 1) to the current message, excluding message 3.
  1167.  
  1168.           As discussed, after the command line is parsed, the command
  1169.           given is called and the rest of the arguments on the command
  1170.           line are passed to it.  If no Mush command has been found
  1171.           that matches the one given, then the variable unix is
  1172.           checked.  If it is set, Mush attempts to run the command
  1173.           line as a UNIX(TM) command.
  1174.  
  1175.           If unix is not set, or if the command could not be found in
  1176.           the user's PATH environment, a message will be printed
  1177.           indicating that the command was not found.
  1178.  
  1179.           Since no "messages" are affected by UNIX commands, those
  1180.           that appear within Mush pipelines are executed by the pipe
  1181.           command.  A UNIX command may never be the first command in a
  1182.  
  1183.  
  1184.  
  1185.      Page 18                                        (printed 12/21/90)
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1193.  
  1194.  
  1195.  
  1196.           pipeline unless the pipe command is used explicitly.  If the
  1197.           user wishes to execute UNIX commands that are to be piped to
  1198.           one another (or use any sort of redirection), the command sh
  1199.           is provided for such purposes.  Since Mush will parse the
  1200.           entire command line, caution should be taken to enclose
  1201.           questionable shell variables or metacharacters with quotes
  1202.           to prevent Mush from expanding them.  See the COMMANDS
  1203.           heading below for more detail.
  1204.  
  1205.           This shell-like quality is for the convenience of the user
  1206.           and is not intended to replace the functionality of sh, csh,
  1207.           or any other command interpreter.
  1208.  
  1209.           Filename metacharacters.
  1210.  
  1211.           Mush's command interpreter does not normally pre-expand
  1212.           metacharacters in the manner of other shells, because the
  1213.           metacharacters may refer to either messages or files.
  1214.           Instead, those commands that deal with file names do any
  1215.           necessary metacharacter expansion.  Two metacharacters are
  1216.           nearly always recognized:  `~' refers to the user's home
  1217.           directory, and `+' refers to the user's folder directory
  1218.           ("~/Mail" or the value of the variable folder).  Another
  1219.           user's home directory can also be referenced as "~username",
  1220.           and for this reason files in the user's home directory must
  1221.           be referenced as "~/filename".  However, the `/' character
  1222.           is optional when referring to folders; that is, "+filename"
  1223.           and "+/filename" both refer to the same file in the folder
  1224.           directory.
  1225.  
  1226.           If filename completion is enabled by setting the variable
  1227.           complete, the command interpreter will expand csh-style
  1228.           metacharacters when completing filenames.  A completion
  1229.           containing metacharacters expands to all the files matching
  1230.           the pattern when the completion key is pressed (defaults to
  1231.           ESC, `^[').  See the description of complete for limitations
  1232.           of this facility.
  1233.  
  1234.      CURSES INTERFACE
  1235.           The curses interface utilizes the curses routines intrinsic
  1236.           to most UNIX systems.  This interface is screen oriented
  1237.           rather than line oriented and allows the user to access
  1238.           commands and messages more quickly at the cost of history,
  1239.           piping, and a few commands.
  1240.  
  1241.           Many users who prefer the curses interface might want to
  1242.           always start all their mail sessions in the curses
  1243.           interface.  Putting the curses command in your
  1244.           initialization file is allowed, but you can also create an
  1245.           alias or function in your login shell to always use the -C
  1246.           option.  Mush will attempt to know not to run a shell if
  1247.           you're just sending mail to someone, so the csh command
  1248.  
  1249.  
  1250.  
  1251.      Page 19                                        (printed 12/21/90)
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1259.  
  1260.  
  1261.  
  1262.           sequences:
  1263.  
  1264.             % alias mail 'mush -C'
  1265.             % mail fred
  1266.  
  1267.           will mail to fred and not enter the shell.  However, if you
  1268.           just said "mail" with no arguments, you'll enter the shell
  1269.           in curses mode if you have mail.  If you don't, you'll be
  1270.           told so, and the shell will not start.  If you want to enter
  1271.           curses mode even if you don't have mail, use the -S option
  1272.           on the command line.
  1273.  
  1274.           In curses mode, the user's terminal has its "echo" turned
  1275.           off so commands that are issued are not echoed on the
  1276.           screen.  Certain commands cause the mode to return to normal
  1277.           for typing purposes (sending mail, for example).  In normal
  1278.           operation, the screen will display the current set of
  1279.           message headers, the current message number is in the top
  1280.           left corner, the mail status on the top line, and the cursor
  1281.           will be placed on the current message.  The number of
  1282.           message headers displayed is set by the variable screen.  If
  1283.           the user does not have that variable set, the baud rate is
  1284.           checked and the size of the screen is set according to
  1285.           optimal refresh time.  Usually, 300 baud gives 7 lines, 1200
  1286.           gives 14, 2400 gives 22 lines, and all higher baud rates
  1287.           give the size of the screen, whatever that may be.  Note
  1288.           that the top line is reserved for "status" and the bottom
  1289.           line is for user interaction should it be required.
  1290.  
  1291.           The user may now type commands via key sequences that are
  1292.           not echoed to the screen.  Thus, function keys may be bound
  1293.           to "commands" by using the bind command.  A list of key-to-
  1294.           command bindings can be found at runtime by typing `?'  in
  1295.           curses mode or by using the bind command in line mode.
  1296.  
  1297.           The commands to which you can map sequences are intended to
  1298.           be as self explanatory as possible, but admittedly, it might
  1299.           be easier to figure out via trial and error than to try to
  1300.           wade through this documentation.  A list of the legal curses
  1301.           commands can be obtained when executing the bind command.
  1302.           Regular tty line-mode commands are not issued from the
  1303.           curses interface; only special curses mode commands are
  1304.           understood.  The current list of valid curses commands is:
  1305.  
  1306.               alias   last-msg        screen-back
  1307.               back-msg        line-mode       screen-next
  1308.               bind    lpr     search-again
  1309.               bind-macro      mail    search-back
  1310.               bottom-page     mail-flags      search-next
  1311.               chdir   map     shell-escape
  1312.               copy    map!    sort
  1313.               copy-list       my-hdrs sort-reverse
  1314.  
  1315.  
  1316.  
  1317.      Page 20                                        (printed 12/21/90)
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1325.  
  1326.  
  1327.  
  1328.               delete  next-msg        source
  1329.               delete-list     preserve        top
  1330.               display quit    top-page
  1331.               display-next    quit!   unbind
  1332.               exit    redraw  undelete
  1333.               exit!   reply   undelete-list
  1334.               first-msg       reply-all       update
  1335.               folder  reverse-video   variable
  1336.               goto-msg        save    version
  1337.               help    save-list       write
  1338.               ignore  saveopts        write-list
  1339.  
  1340.  
  1341.           The following is a list of default key-command bindings.  If
  1342.           you specify bind commands in your initialization file that
  1343.           conflict with these defaults, your settings will override
  1344.           the defaults.  The default settings given in this manual use
  1345.           the ^-character method to indicate control characters
  1346.           (mostly because nroff makes printing the backslash character
  1347.           so amazingly difficult).  Thus, `^X' would mean control-X
  1348.           even though you'd have to type "\CX" to set the binding and
  1349.           actually use the control key and the `X' key simultaneously
  1350.           to really do a Control-X.
  1351.  
  1352.           ., t, p, T=top, n=next
  1353.                Display (type/print) message.  Top will display the
  1354.                first crt lines of a message.  Next will print the next
  1355.                message.  If the current message is deleted, the next
  1356.                undeleted message is found.  You might notice this is
  1357.                different from the line mode, which will return an
  1358.                error message that the current message is marked as
  1359.                deleted.
  1360.  
  1361.           +, j, J, RETURN
  1362.                Go to next message.
  1363.  
  1364.           -, k, K, ^K
  1365.                Go to previous message.
  1366.  
  1367.           ^, $ Go to first/last message.
  1368.  
  1369.           {, } Go to top/bottom of screen.
  1370.  
  1371.           a    Set aliases.
  1372.  
  1373.           b, B Set/unset bindings.
  1374.  
  1375.           d, D, u, U
  1376.                Delete/undelete messages (capitals prompt for message
  1377.                list).
  1378.  
  1379.           f    Change folder.  If current folder has changed,
  1380.  
  1381.  
  1382.  
  1383.      Page 21                                        (printed 12/21/90)
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1391.  
  1392.  
  1393.  
  1394.                verification for update will be requested.
  1395.  
  1396.           g, 0-9
  1397.                Go directly to a specified message.  When the "goto"
  1398.                command is selected, a prompt at the bottom of the
  1399.                window prompts for a message list.  Anything that
  1400.                describes a message list may be used.  Since Mush
  1401.                commands return message lists, a legal Mush command
  1402.                enclosed in backquotes may be used to go to a
  1403.                particular message.  The new current message pointer
  1404.                will point to the next message, returned by the
  1405.                command, that is below the old current message.  An
  1406.                example:
  1407.  
  1408.                  goto msg: `pick -f argv`
  1409.  
  1410.                This will cause the current message to move to the
  1411.                first message in the current folder from the user
  1412.                "argv" that comes after the message pointed to when the
  1413.                "goto" was issued.  So, if messages 1 and 5 are from
  1414.                the user "argv" and the current message the user was on
  1415.                was message 3, then the new current message would be
  1416.                message 5, since it is the first message found after
  1417.                message 3 that is from "argv".  If none of the messages
  1418.                are found after the current message, the new current
  1419.                message will be the first one returned by the command.
  1420.  
  1421.           h    Set personal headers.
  1422.  
  1423.           i    Set ignored headers.
  1424.  
  1425.           m, M Send mail (capital prompts for mail flags).
  1426.  
  1427.           o, O Order messages (sort; capital reverses order).  A
  1428.                prompt requests the sort constraints.
  1429.  
  1430.           q, Q, x, X
  1431.                Quit/exit.  `q' will test to see if the current folder
  1432.                has been updated and prompt the user to verify
  1433.                updating.  `x' does not update mail, but quits the
  1434.                program.  `Q' does not prompt for update verification;
  1435.                if changes were made, updating is automatic.  `Q'
  1436.                (quit!) and `X' (exit!) will work even when typed at
  1437.                the "...continue..." prompt, whereas `q' and `x' will
  1438.                not.
  1439.  
  1440.           r, R Reply/reply all.
  1441.  
  1442.           s, S, c, C, w, W
  1443.                Save, copy, or write messages (capitals prompt for
  1444.                message lists).
  1445.  
  1446.  
  1447.  
  1448.  
  1449.      Page 22                                        (printed 12/21/90)
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1457.  
  1458.  
  1459.  
  1460.           v    Set regular variables (as opposed to environment
  1461.                variables).
  1462.  
  1463.           V    Print version number.
  1464.  
  1465.           z, Z Print next/previous screenful of message headers.
  1466.  
  1467.           ^L   Redraw the screen.
  1468.  
  1469.           ^P   Preserve current message (toggle).
  1470.  
  1471.           ^U   Update folder.  A prompt will request confirmation.
  1472.  
  1473.           ^R   Toggle reverse video mode (current message is in
  1474.                reverse video).
  1475.  
  1476.           |    Send message to printer
  1477.  
  1478.           !    Shell Escape.  Prompts for command; RETURN invokes a
  1479.                shell.
  1480.  
  1481.           %    change directory.
  1482.  
  1483.           (, ) Source/saveopts.  Prompts for file name.
  1484.  
  1485.           /, ^/, ^N
  1486.                Forward, backward, continue search for patterns.
  1487.                Entire messages are not searched for here.  Only the
  1488.                text available on the screen is searched for.  Note
  1489.                that some terminals use `^_' (control-underscore) for
  1490.                `^/', so you may wish to re-bind this key.
  1491.  
  1492.           &&   Create a curses mode macro.
  1493.  
  1494.           &:   Create a line mode macro.
  1495.  
  1496.           &!   Create a composition mode macro.
  1497.  
  1498.           :[cmd]
  1499.                Enter line mode for one command.  History is not
  1500.                recorded for this escape, and line mode macros are not
  1501.                available.  If no command is given, curses mode is
  1502.                exited and the session continues in line mode (in which
  1503.                case history and macros become available).
  1504.  
  1505.           When setting new key sequences to be bound to commands, the
  1506.           user may use control keys and the ESCAPE character for
  1507.           extended commands.  Exceptions are control-C, control-\, and
  1508.           possibly other control characters depending on your system's
  1509.           configuration or your current tty mode settings.
  1510.  
  1511.           When assigning key sequences to commands, the user enters
  1512.  
  1513.  
  1514.  
  1515.      Page 23                                        (printed 12/21/90)
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1523.  
  1524.  
  1525.  
  1526.           the bind command and prompting is done.  If the user wishes
  1527.           to have control characters or the escape character in a key
  1528.           sequence while still using ASCII format, a special notation
  1529.           for control characters is provided.  This sequence is used
  1530.           primarily for the use of binding control character sequences
  1531.           in the initialization file.  This format is also used to
  1532.           display the current key-command mappings by the program.
  1533.  
  1534.           To specify control characters in ASCII format for the bind
  1535.           command, the sequence "\Cc" is used where `c' is the
  1536.           character that the control key will translate to and must be
  1537.           in upper case.  The sequence "\CP" would map to control-P.
  1538.           If the user wishes to indicate the RETURN key, this is
  1539.           specified with the string "\n" and the tab key is specified
  1540.           by the string "\t".  As a more complex example, on a Wyse-50
  1541.           terminal, the 8th function key outputs the three characters:
  1542.           control-A, H, line-feed.  To map this function key to a
  1543.           command, the user would have to enter the sequence "\CAH\n"
  1544.           as the key sequence, then follow up with a valid curses
  1545.           command.  From then on, if the user presses that function
  1546.           key, the command mapped to it will be executed.
  1547.  
  1548.           The ESCAPE key is signified by the sequence, "\E".  On a
  1549.           Sun-3 workstation, the R1 key outputs the character
  1550.           sequence: ESC, [, 2, 0, 8, z.  The corresponding bind key
  1551.           sequence would be "\E[208z".  Restrictions are that key
  1552.           sequences may not contain the space character unless bound
  1553.           in line mode, and can never begin with a digit.
  1554.  
  1555.           Whenever a command is entered, other than `^L' (redraw),
  1556.           which causes the screen to scroll or be refreshed in any
  1557.           way, Mush is left in the continue mode.  When in this mode,
  1558.           the user is given his line-mode prompt followed by
  1559.           "...continue..." indicating that he may issue a new command
  1560.           or return to the top level where the current message headers
  1561.           are displayed on the screen.  Remember that this is still
  1562.           the curses mode, but much time is saved by avoiding
  1563.           redrawing the screen after each command.  The user may move
  1564.           up and down messages using the appropriate commands (j/k by
  1565.           default) or anything else the curses mode allows.  Only the
  1566.           exit and quit commands will return to the top level.
  1567.           Because of this, there are 2 additional ways to "quit" from
  1568.           curses mode and return to the login shell.  The "exit" and
  1569.           "quit" commands will quit from the top level, but the
  1570.           commands exit! and quit! are used to exit from the
  1571.           "continue" level in the curses interface as well as from the
  1572.           top level.
  1573.  
  1574.           Note that the best way to understand the curses interface is
  1575.           to just use it.  In line mode, the command "curses" puts you
  1576.           into curses mode.
  1577.  
  1578.  
  1579.  
  1580.  
  1581.      Page 24                                        (printed 12/21/90)
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1589.  
  1590.  
  1591.  
  1592.      GRAPHICS TOOL INTERFACE
  1593.           When running the window-based tool interface, there will be
  1594.           five subwindows:  a panel for folder-related commands and
  1595.           general options, a scrollable display of message header
  1596.           summaries, another panel of message manipulation commands, a
  1597.           four-line scrollable window for warnings and output from
  1598.           certain commands, and a larger window which is used for
  1599.           displaying messages.  The message display and command output
  1600.           windows can be scrolled with the up and down cursor keys
  1601.           (function keys R8 and R14 by default), and also recognize
  1602.           "vi" movements (j, k, ^U, ^D, etc.), in addition to having
  1603.           scrollbars.
  1604.  
  1605.           In the header summary window, pressing the LEFT mouse button
  1606.           while pointing at a message header displays that message in
  1607.           the large message window at the bottom of the frame.
  1608.           Pressing the middle button deletes the message, and pressing
  1609.           the RIGHT mouse button displays a menu of actions that will
  1610.           affect the message.  Possible actions are to display the
  1611.           message, delete or undelete it, reply to it, save it,
  1612.           preserve it (see the preserve command), or print it
  1613.           (hardcopy).
  1614.  
  1615.           All panel items in the frame have labels describing their
  1616.           functionality.  Selecting a panel item with the LEFT mouse
  1617.           button causes the action to be executed.  The RIGHT mouse
  1618.           button displays a menu of options that the command may
  1619.           branch to.  For example, the Save panel item by default will
  1620.           save messages to the file "mbox", but the RIGHT mouse button
  1621.           causes a menu to be displayed, and the choices of where to
  1622.           save the message increase to include the items in the menu.
  1623.           These typically include the files in the user's folder
  1624.           directory (see the folder variable below).
  1625.  
  1626.           At the end of most lists of menu entries for panel items is
  1627.           an item labelled "help".  When this item is chosen, an new
  1628.           window is opened where help for that command is displayed.
  1629.           Note:  The limited number of file descriptors in SunOS 3.5
  1630.           forces Mush to display help information in the message
  1631.           window in the main frame.
  1632.  
  1633.           When composing letters, a separate frame is created which
  1634.           includes a panel of command items, a four-line scrollable
  1635.           window, and a large window for editing the letter.  Panel
  1636.           items for including messages, editing (via your usual text
  1637.           editor), sending, aborting the message, and various other
  1638.           manipulations are supplied.  See the section on "Sending
  1639.           mail", under the summary of tilde escapes, for more details
  1640.           of composition frame command items.  As long as the
  1641.           composition frame is open, all Mush command output is
  1642.           redirected from the small window in the main frame to the
  1643.           small window here.  Note:  This subwindow is not present in
  1644.  
  1645.  
  1646.  
  1647.      Page 25                                        (printed 12/21/90)
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1655.  
  1656.  
  1657.  
  1658.           SunOS 3.5 due to the limited number of file descriptors;
  1659.           command output stays in the main frame in that case.  The
  1660.           SunView textsw interface is used by default in the large
  1661.           window for paging and editing.  Cursor movement with the
  1662.           function keys (R8, R10, R12, and R14 by default) is
  1663.           supported.
  1664.  
  1665.      COMMANDS
  1666.           Described below are legal commands understood by Mush that
  1667.           you can type at the line mode prompt.  Most commands have
  1668.           abbreviations (given in parentheses) and can be followed by
  1669.           message lists.  In most cases, whitespace is not necessary
  1670.           to separate commands from message lists.  For example, "d*"
  1671.           will delete all messages, and "u1-7 {4}" will undelete
  1672.           messages 1 through 7 except for message number 4.  NOTE:
  1673.           This "token splitting" may have unexpected side effects,
  1674.           especially for UNIX commands whose names contain digits.
  1675.  
  1676.           The ability to customize commands using the cmd facility
  1677.           allows users to customize Mush to resemble other mailers.
  1678.           However, efforts have already been made to include commands
  1679.           that are backwards compatible with other line-mode mailers.
  1680.           Users of the graphics tool mode of Mush may have little need
  1681.           for the command line mode because the icon based interface
  1682.           allows interaction with many commands.  The tool mode is
  1683.           much more restrictive in favor of a simpler, user friendly
  1684.           interface, but most useful commands may be achieved anyway.
  1685.  
  1686.           The following is a list of all recognized commands.  Since
  1687.           most commands accept a message list as an argument,
  1688.           arguments are noted only when they differ from a message
  1689.           list.
  1690.  
  1691.           alias [name] [address-list]
  1692.           unalias name
  1693.                The alias command defines a name to stand for a list of
  1694.                addresses.  The defined name can then be substituted
  1695.                for the entire list when sending mail.  For example,
  1696.  
  1697.                  alias dan dheller@cory.berkeley.edu argv@zipcode.com
  1698.  
  1699.                This defines the name "dan" to be shorthand for two
  1700.                addresses, both of which happen to be Dan Heller.
  1701.  
  1702.                The command unalias can be used to remove an alias
  1703.                definition.
  1704.  
  1705.                With no arguments, alias prints out all the current
  1706.                aliases.  With one argument, it prints the list
  1707.                associated with that name, and with more than one
  1708.                argument, it creates a new alias.
  1709.  
  1710.  
  1711.  
  1712.  
  1713.      Page 26                                        (printed 12/21/90)
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1721.  
  1722.  
  1723.  
  1724.           alternates [host-list] [!path!login] [*[user]]
  1725.                (alts) This command is useful if you have accounts on
  1726.                several machines.  It can be used to inform Mush that
  1727.                your login name at each of the listed hosts is really
  1728.                you.  When you reply to messages, Mush will not send a
  1729.                copy of the message to your login name at any of the
  1730.                hosts listed on the alternates list.  If the special
  1731.                symbol "*" is used, then your login name is matched
  1732.                against all pathnames and local addresses.  A user name
  1733.                may be appended to the "*", in which case that name is
  1734.                matched instead of your login name.
  1735.  
  1736.                If you have another login name on the local or remote
  1737.                machine, then that login may be specified by preceding
  1738.                the login name or the path to the login name by a `!'
  1739.                character.
  1740.  
  1741.                For example,
  1742.  
  1743.                  alts zipcode maui1 !cory.berkeley.edu!dheller !root
  1744.  
  1745.                are all either hostnames or pathnames to my other
  1746.                accounts.  The last item, "!root" will match root that
  1747.                is only destined for my workstation.  Root accounts
  1748.                elsewhere are not considered to be me.
  1749.  
  1750.                If the alternates command is given with no arguments,
  1751.                the current set of alternate names is displayed.
  1752.  
  1753.           await [-T timeout]
  1754.                Directs the shell to wait for the arrival of new mail.
  1755.                New mail is checked approximately every 30 seconds, or
  1756.                every timeout seconds as specified by the -T option.
  1757.                This command does not return until new mail arrives or
  1758.                until a keyboard interrupt (^C) is typed.  Unless the
  1759.                string "await" appears in the value of the variable
  1760.                quiet, the terminal bell will ring when await reads in
  1761.                a new message (see the VARIABLES section for details).
  1762.  
  1763.           bind [string [command [parameters]]]
  1764.           unbind string
  1765.                Bind the sequence of keystrokes specified by string to
  1766.                the curses-mode function, command.  The string is
  1767.                usually one or two characters, or a sequence sent by
  1768.                one of the "function keys" of a particular terminal.
  1769.                See the CURSES INTERFACE section for a complete list of
  1770.                curses-mode functions; this interface is not available
  1771.                on all systems.  The parameters are currently
  1772.                recognized only for the special macro function; see the
  1773.                bind-macro command for details.
  1774.  
  1775.                If no arguments are given to bind, the current set of
  1776.  
  1777.  
  1778.  
  1779.      Page 27                                        (printed 12/21/90)
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1787.  
  1788.  
  1789.  
  1790.                curses bindings are listed; if only a string argument
  1791.                is given, the binding for that string is listed; and if
  1792.                both a string and a command are given, a curses binding
  1793.                is created such that when the string is typed in curses
  1794.                mode, the function specified by command will be
  1795.                executed.
  1796.  
  1797.                Bindings can be removed by using the unbind command.
  1798.  
  1799.           bind-macro [string [expansion]]
  1800.                This command is an abbreviation, which invokes the bind
  1801.                command with the special function macro as the second
  1802.                argument.  The effect of binding a curses macro is that
  1803.                whenever the string is typed in curses mode, the effect
  1804.                is the same as if the expansion had been typed instead.
  1805.                A special syntax is provided for including non-printing
  1806.                (control) characters in both the string and the
  1807.                expansion; see the CURSES INTERFACE section and the
  1808.                MACROS section for details.
  1809.  
  1810.                If no arguments are given, bind-macro will list the
  1811.                current curses mode macros.  It is otherwise identical
  1812.                to
  1813.                    bind string macro expansion.
  1814.  
  1815.           cd   Change the working directory to that specified, if
  1816.                given.  If no directory is given, then changes to the
  1817.                user's home directory.
  1818.  
  1819.           cmd [name [command]]
  1820.           uncmd name
  1821.                Command line aliases are set and unset using these
  1822.                commands.  More extensive information is given in the
  1823.                LINE-MODE INTERFACE section.  Uncmd may take `*' as an
  1824.                argument to uncmd everything set.
  1825.  
  1826.           curses [off]
  1827.                The curses command causes Mush to change from the
  1828.                line-oriented mode to the screen-oriented (curses)
  1829.                mode, as described above in the CURSES INTERFACE
  1830.                section.  This command may not be given when curses
  1831.                mode is already active.  When used in an initialization
  1832.                file (such as .mushrc) this command is the same as
  1833.                giving the -C (-curses) switch on the mush command
  1834.                line.
  1835.  
  1836.                The argument off may be used only in initialization
  1837.                files, including those read with -I (-init), and has
  1838.                the effect of turning off the -C switch.  Off is
  1839.                ignored at all other times, even in files read with -F
  1840.                (-source).
  1841.  
  1842.  
  1843.  
  1844.  
  1845.      Page 28                                        (printed 12/21/90)
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1853.  
  1854.  
  1855.  
  1856.           debug [N]
  1857.                Set debugging level to N (1 by default).  When in debug
  1858.                mode, the user can see some of the flow of control the
  1859.                program makes while executing.  The intent of the debug
  1860.                level is for tracking down bugs with the program at
  1861.                specific locations.  Occasionally, the program may
  1862.                segmentation fault and core dump.  When this happens,
  1863.                the user can reenter the program, set the debugging
  1864.                level and recreate the problem.
  1865.  
  1866.                If the user suspects memory allocation problems, a
  1867.                debugging level of 5 or higher will prevent memory from
  1868.                being freed so that memory bounds won't get
  1869.                overwritten.
  1870.  
  1871.                If the user suspects Mail Transport Agent errors, a
  1872.                debugging level of 3 or higher will prevent the MTA
  1873.                from starting and outgoing mail is directed to the
  1874.                standard output instead of actually being sent.
  1875.  
  1876.           delete/undelete
  1877.                (d/u) Takes a message list as argument and marks them
  1878.                all as deleted.  Deleted messages will not be saved in
  1879.                mbox, nor will they be available for most other
  1880.                commands.  If the folder has not been updated, deleted
  1881.                messages can be recovered with undelete.
  1882.  
  1883.           dt   Deletes the current message and prints the next
  1884.                message.
  1885.  
  1886.           echo [-n] [-h | -p] arguments
  1887.                Echoes all the arguments given on the command line,
  1888.                expanding variables and history references.  If the -n
  1889.                flag is given, then no newline is appended.  If the -h
  1890.                flag is given, then echo looks for formatting
  1891.                parameters as if the "from" command were given on the
  1892.                "current" message.  If the -p flag is given, then echo
  1893.                looks for formatting parameters as if your prompt were
  1894.                changed temporarily.
  1895.  
  1896.                Examples:
  1897.  
  1898.                  echo -h This message is from %a and is dated %d.
  1899.                might produce:
  1900.                  This message is from zipcode!argv and is dated Dec 14, 1988.
  1901.  
  1902.                  echo -p There are %n new messages to read in %f.
  1903.                might produce:
  1904.                  There are 5 new messages to read in /usr/spool/mail/argv.
  1905.  
  1906.                Note that -h and -p cannot be specified together.
  1907.  
  1908.  
  1909.  
  1910.  
  1911.      Page 29                                        (printed 12/21/90)
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1919.  
  1920.  
  1921.  
  1922.           edit (e, v) This function lets you edit messages in your
  1923.                folder.  When editing messages, be careful not to
  1924.                remove certain message headers such as Date or From or
  1925.                any others that looks important.  If you remove or
  1926.                change something you shouldn't have, you will be
  1927.                notified and the temporary file used to edit the
  1928.                message will not be removed.
  1929.  
  1930.           eval [-h | -p] arg ...
  1931.                As in most shells, the list of arguments to eval is
  1932.                re-parsed and then executed as a command.  This is
  1933.                useful primarily for causing multiple levels of
  1934.                variable expansion.
  1935.  
  1936.                If the -h option is given, eval will expand header
  1937.                format strings in the argument list before executing
  1938.                the command.  Similarly, the -p option will expand
  1939.                prompt format strings in the argument list before
  1940.                executing.  These formats are expanded last, after all
  1941.                history and variable expansion is completed, and are
  1942.                implicitly quoted, so embedded quotes, spaces, tabs,
  1943.                `!'s, etc. are handled correctly.  Header formats are
  1944.                expanded using the current message.  For example,
  1945.  
  1946.                  eval -h pick -f %a
  1947.  
  1948.                will find all messages from the same author as the
  1949.                current message.  See the the entries for hdr_format
  1950.                and prompt in the VARIABLES section for more details.
  1951.  
  1952.                Note that -h and -p cannot be specified together.
  1953.  
  1954.           exit (x) Returns immediately to the login shell without
  1955.                modifying the current folder or system spool directory.
  1956.  
  1957.           expand alias-list
  1958.                Aliases, given as arguments, are expanded as they would
  1959.                be if you were to send mail to each.
  1960.  
  1961.           flags [ [ + | - ] [ D f N O P p R r S U ] ] [msg-list]
  1962.                This command modifies the flag bits set on the listed
  1963.                messages.  It should not normally be needed, but is
  1964.                provided to allow users, through the cmd facility, to
  1965.                alter the ways that certain conditions are recorded.
  1966.                Multiple flag bits may be set or modified at once.  The
  1967.                modifiable flag bits are:
  1968.  
  1969.                    D       deleted
  1970.                    f       forwarded
  1971.                    N       new
  1972.                    O       old
  1973.                    P       preserved
  1974.  
  1975.  
  1976.  
  1977.      Page 30                                        (printed 12/21/90)
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  1985.  
  1986.  
  1987.  
  1988.                    p       printed
  1989.                    R       read
  1990.                    r       replied-to
  1991.                    S       saved
  1992.                    U       unread
  1993.  
  1994.                If a `+' or `-' is included in the list of bits, the
  1995.                specified bits are turned on or off respectively,
  1996.                without modifying other bits.  If no `+' or `-' is
  1997.                given, then the list of bits is set explicitly and all
  1998.                other bits are lost.  The `-' modifier can be escaped
  1999.                with a backslash (i.e., "\-") to prevent its
  2000.                interpretation as part of a message range, or it may be
  2001.                given after the list of bits for the same reason.
  2002.  
  2003.                Message lists can be piped to the flags command; for
  2004.                example, you may use
  2005.  
  2006.                    cmd r 'flags \!* + r | reply'
  2007.  
  2008.                to mark as replied-to all messages included in a reply.
  2009.  
  2010.           folder [-N] [-n] [-r] [ %[user] | # | & | file ]
  2011.                (fo) Change current folder.  With no arguments, prints
  2012.                the name of the current folder.  The arguments are:
  2013.                  -N     No headers are displayed upon entering new folder
  2014.                  -n   The current folder is not updated
  2015.                  -r     Set Read-Only mode (can't alter new folder)
  2016.                  %[user] Change to /usr/spool/mail/[user] (default is yours)
  2017.                  #       Switch back to the previous folder
  2018.                  &       Change folder to $mbox (default is ~/mbox)
  2019.  
  2020.                File names that do not begin with `/' are interpreted
  2021.                relative to the current directory unless they begin
  2022.                with one of the metacharacters `+' or `~'.  As in csh,
  2023.                the character `~' expands to the user's home directory
  2024.                (or to some other user's home directory if used as
  2025.                "~username").  The character `+' is expanded to the
  2026.                name of the user's folder directory (defaults to
  2027.                "~/Mail" or the value of the variable folder).  For
  2028.                compatibility with other mailers, no `/' character
  2029.                needs to appear between the `+' and the name of the
  2030.                folder (see "Filename metacharacters" in the LINE-MODE
  2031.                INTERFACE section).
  2032.  
  2033.                This command can only appear in a pipeline if it is the
  2034.                first command; it returns a list of all the messages in
  2035.                the new folder.  This command cannot be used in
  2036.                initialization files before the shell has started.
  2037.  
  2038.                For compatibility with older versions, the argument `!'
  2039.                with no leading `-' is interpreted as -n.
  2040.  
  2041.  
  2042.  
  2043.      Page 31                                        (printed 12/21/90)
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2051.  
  2052.  
  2053.  
  2054.           folders
  2055.                List the names of the folders in your folder directory.
  2056.                Your folder directory is the directory Mail in your
  2057.                home directory.  Or, you can set the variable folder to
  2058.                specify another folder directory.
  2059.  
  2060.           from [ + | - ] [msg-list] [pattern]
  2061.                (f) With no arguments, from will print the current
  2062.                message's header summary (see the variable hdr_format).
  2063.                If given a pattern, from will print the headers of
  2064.                those messages whose "From: " lines match the pattern.
  2065.                When a message list precedes the pattern, or when a
  2066.                message list is supplied by a pipeline, the search is
  2067.                restricted to that list.  If only a message list is
  2068.                given (or piped), from will print the headers of the
  2069.                listed messages.
  2070.  
  2071.                The special arguments `-' and `+' can be given to move
  2072.                the current message pointer to the previous or next
  2073.                message, respectively, while also printing that
  2074.                message's header.  If a message list was given in
  2075.                addition to `-' or `+', then the current message
  2076.                pointer will be set to the first or last message,
  2077.                respectively, in the message list given.  Examples:
  2078.  
  2079.                  from + Dan
  2080.  
  2081.                will print the headers of all messages that contain
  2082.                "Dan" in in the author's name and set the current
  2083.                message pointer to the last one of that kind in the
  2084.                list.
  2085.  
  2086.                  from - 10-30 {16}
  2087.  
  2088.                will print the headers of messages 10 through 30 except
  2089.                for message 16 and set the current message pointer to
  2090.                10.
  2091.  
  2092.                  from +
  2093.  
  2094.                will print the header of the message after the current
  2095.                message and increment the current message pointer to
  2096.                the next message.
  2097.  
  2098.                  from $
  2099.  
  2100.                will print the last message's header and not move the
  2101.                current message pointer.
  2102.  
  2103.           headers [ [-H][:c] ] [ + | - ]
  2104.                (h, z) Prints a screenful of message headers listed in
  2105.                the current folder.  If a message number is given on
  2106.  
  2107.  
  2108.  
  2109.      Page 32                                        (printed 12/21/90)
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2117.  
  2118.  
  2119.  
  2120.                the command line, the first message of the screenful of
  2121.                messages will be that message number.  The `z' command
  2122.                is identical to the "h +" command and remains for
  2123.                compatibility reasons.  The variable screen may be set
  2124.                to tell how many headers are in a screenful.  In the
  2125.                graphics tool mode, the variable screen_win contains
  2126.                the number of headers used in the headers subwindow.
  2127.  
  2128.                A typical header may look like:
  2129.  
  2130.                  5 >N  argv@spam.istc.sri.com Feb 19, (10/278) Test
  2131.  
  2132.                This line indicates that it is message number 5 and the
  2133.                > indicates that the "current message pointer" is
  2134.                pointing to this message.  The next two positions
  2135.                indicate the message status.  The first may be one of,
  2136.                "N" (new and unread), "U" (old, but still unread), "*"
  2137.                (deleted), "S" (saved), "P" (preserved), or " " (read).
  2138.                The second position may have an "r" if the message has
  2139.                been replied to.
  2140.  
  2141.                The author of the example message header is
  2142.                argv@spam.istc.sri.com, the date is Feb 19, the number
  2143.                of lines in the message is 10, the number of characters
  2144.                is 278 and the subject of the message is Test.  The
  2145.                format of the message header shown here is described by
  2146.                the string variable hdr_format.  The example given
  2147.                above has a hdr_format of
  2148.  
  2149.                  set hdr_format = "%25f %7d (%l/%c) %25s"
  2150.  
  2151.                See the description of hdr_format in the VARIABLES
  2152.                section for more information on header formats.
  2153.  
  2154.                You can print a special subset of message headers by
  2155.                using the -H:c option, where `c' is one of:
  2156.                  a       all messages
  2157.                  d       deleted messages
  2158.                  n       new messages
  2159.                  o       old messages
  2160.                  r       replied to messages
  2161.                  s       saved messages
  2162.                  u       unread messages
  2163.                Note that the -H is not required; "headers :c" is
  2164.                valid.
  2165.  
  2166.                More options to the headers command include `+' and
  2167.                `-'.  Each will print the next or previous screenful of
  2168.                message headers.  The z command can also be used; `z'
  2169.                alone will print the next screenful (thus, the `+' is
  2170.                optional) and "z -" is equivalent to "h -".
  2171.  
  2172.  
  2173.  
  2174.  
  2175.      Page 33                                        (printed 12/21/90)
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2183.  
  2184.  
  2185.  
  2186.                Headers affects all the messages it displays, so piping
  2187.                may be done from the headers command.  Piping to the
  2188.                headers command causes the message headers affected by
  2189.                the previous command to be printed.  This action is
  2190.                identical to piping to the from command.
  2191.  
  2192.           help [topic]
  2193.                Help is provided on a per topic basis and on a general
  2194.                basis.  For general help, just typing help will provide
  2195.                some general information as to how to get further help
  2196.                and a list of topics suggested for more specific help.
  2197.                There is also help provided for each command by using
  2198.                the -?  option to most commands.  This option will
  2199.                provide command line usage information as well as a
  2200.                description of what the command does and how to use it.
  2201.  
  2202.                If no help file is found, an error message will be
  2203.                printed.  The location of the help files may be reset
  2204.                by setting the variables cmd_help and tool_help to the
  2205.                paths of the new help files.
  2206.  
  2207.                The tool_help variable is recognized only by versions
  2208.                capable of using suntool mode (tool mode need not be
  2209.                active).
  2210.  
  2211.           history [-h] [-r] [N]
  2212.                This command displays the command history in
  2213.                chronological order; early commands are printed first
  2214.                followed by more recent commands displayed last.
  2215.                Option -h suppresses printing of history event numbers
  2216.                with each history command.  Option -r reverses the
  2217.                order of the history events displayed.
  2218.  
  2219.                If a number N is given, then that number of previous
  2220.                commands is echoed rather than the number set by the
  2221.                variable history.
  2222.  
  2223.                See the LINE-MODE INTERFACE section for a description
  2224.                of referencing the history in commands.
  2225.  
  2226.           ignore/unignore [header-list]
  2227.                Display or set a list of headers to be ignored when
  2228.                displaying messages.  When reading messages, all the
  2229.                message headers are displayed with the text body of the
  2230.                message.  Since these message identifier fields are
  2231.                cumbersome and uninteresting in many cases, you can
  2232.                filter out unwanted headers by using this command.  For
  2233.                example,
  2234.  
  2235.                  ignore Received Date Message-Id
  2236.  
  2237.                will ignore the three specified fields.  Additional
  2238.  
  2239.  
  2240.  
  2241.      Page 34                                        (printed 12/21/90)
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2249.  
  2250.  
  2251.  
  2252.                ignore commands are cumulative.  The command unignore
  2253.                is used to reverse the effects of ignore.
  2254.  
  2255.                For another way to control this, see the variable
  2256.                show_hdrs.
  2257.  
  2258.           lpr [-h] [-n] [-Pname] [msg-list]
  2259.                Takes a message list and sends those messages, one by
  2260.                one, to the printer, each separated by page feeds.  The
  2261.                -h option suppresses printing of ignored headers (see
  2262.                the ignore command and the variables show_hdrs and
  2263.                alwaysignore), and the -n option suppresses all
  2264.                headers.  A default printer name is supplied if one is
  2265.                not specified on the command line (-Pprinter-name).  If
  2266.                you have the variable printer set, that printer name
  2267.                will be used.
  2268.  
  2269.                If the variable print_cmd is set, the command described
  2270.                by that variable will be used instead of the default
  2271.                system command.  In such cases, the -P option and the
  2272.                printer variable are ignored and the command is simply
  2273.                executed as is.
  2274.  
  2275.                The "printed" status bit is set for each message
  2276.                printed by this command.
  2277.  
  2278.           ls [flags]
  2279.                This command duplicates the UNIX(TM) command /bin/ls.
  2280.                By default, ls always uses the -C flag (columnate
  2281.                output).
  2282.  
  2283.           mail [flags] [recipient ...]
  2284.                (m) Send mail to a list of users.  If no recipient list
  2285.                is specified on the Mush command line, then a "To: "
  2286.                prompt will request one.  A list of recipients must be
  2287.                supplied at some time before the message is sent, but
  2288.                is not required to begin composing a letter.  This
  2289.                implementation of Mush supports mailing to files and
  2290.                programs as recipients.  Filenames must be full
  2291.                pathnames; thus, they must start with a `/' or there is
  2292.                no way to know whether a recipient is a pathname or a
  2293.                user name.  The special characters `+' and `~' may
  2294.                precede pathnames since they are expanded first to the
  2295.                user's folder directory (+), as described by the
  2296.                variable folder, and the user's home directory (~).
  2297.                Mailing to programs is indicated by the pipe `|'
  2298.                character preceding the program name.  Since the user's
  2299.                path is searched, full pathnames are not required for
  2300.                programs that lie in the user's PATH environment
  2301.                variable.
  2302.  
  2303.                Example:
  2304.  
  2305.  
  2306.  
  2307.      Page 35                                        (printed 12/21/90)
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2315.  
  2316.  
  2317.  
  2318.                  mail username, /path/to/filename, "|program_name",
  2319.                +folder_name, ~user/mbox
  2320.  
  2321.                Options are:
  2322.                  -b addr-list   set list of blind carbon recipients
  2323.                  -c addr-list   set list of carbon copy recipients
  2324.                  -E     edit outgoing message headers
  2325.                  -e     immediately enter editor (autoedit)
  2326.                  -F     add random fortune to the end of message
  2327.                  -f [msg-list]  forward messages (not indented)
  2328.                  -H file        read file as prepared text (no headers)
  2329.                  -h file        read file as a draft (text and headers)
  2330.                  -I [msg-list]  include messages with headers (indented)
  2331.                  -i [msg-list]  include messages in letter (indented)
  2332.                  -s [subject]   prompt for subject [set subject explicitly]
  2333.                  -U     send draft immediately (use only with -h)
  2334.                  -u     unsigned: no signatures or fortunes added
  2335.                  -v     verbose (passed to mail delivery program)
  2336.  
  2337.                The verbose option may not be available depending on
  2338.                the mail transport agent on your system.
  2339.  
  2340.                The -e flag causes you to enter the editor described by
  2341.                the variable visual.
  2342.  
  2343.                The -E flag causes Mush to place the headers of the
  2344.                outgoing message in the editor file so they can be
  2345.                changed.  See the description of the variable edit_hdrs
  2346.                for details.
  2347.  
  2348.                The -i flag will include the current message into the
  2349.                body of the message you are about to send.  The
  2350.                included message is indented by the string "> " or by
  2351.                the string described by the variables indent_str,
  2352.                pre_indent_str, and post_indent_str.  See the VARIABLES
  2353.                section for more information on these string values.
  2354.                If a message list is given after the -i option, then
  2355.                the messages described by that list are included.  The
  2356.                -I option is identical to the -i option except that the
  2357.                headers of the message are also included.
  2358.  
  2359.                The -s flag looks at the next argument and sets the
  2360.                subject to that string.  If the string is to contain
  2361.                spaces, enclose the entire subject in quotes.  If there
  2362.                is no following argument, then the subject will be
  2363.                prompted for.  This flag is useful if the user:
  2364.  
  2365.                  +o does not have the variable ask set, or
  2366.                  +o wishes to change the subject used with reply
  2367.  
  2368.                The subject is not prompted for and is ignored
  2369.                completely if the -f flag is specified (see below).
  2370.  
  2371.  
  2372.  
  2373.      Page 36                                        (printed 12/21/90)
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2381.  
  2382.  
  2383.  
  2384.                The -f flag is for message forwarding only.  An
  2385.                optional message list can be given just as the -i
  2386.                option has.  The forward option does not allow you to
  2387.                edit the message(s) being forwarded unless the -e flag
  2388.                is also specified.  The subject of the message (if
  2389.                available) is the same as the current message; it is
  2390.                not necessarily the subject of the message being
  2391.                forwarded.  The subject of forwarded mail cannot be
  2392.                changed.  However, using the -e flag will allow the
  2393.                user to change the subject once in editing mode either
  2394.                by using the escape sequence, "~s", or by editing the
  2395.                "Subject:" header.
  2396.  
  2397.                Forwarded mail that has not been edited by the user
  2398.                will contain special headers such as
  2399.  
  2400.                  Resent-To:
  2401.                  Resent-From:
  2402.  
  2403.                and perhaps others, depending on your mail transport
  2404.                agent.  Sendmail, for example, may add a number of
  2405.                other "Resent-*" headers.
  2406.  
  2407.                The -u option, meaning "unsigned", prevents signatures
  2408.                and fortunes from being appended to the message.  It
  2409.                overrides the variables autosign and fortune, but will
  2410.                affect the -F option only if given after it on the
  2411.                command line.
  2412.  
  2413.                The -h option indicates that the given file is a
  2414.                previously prepared message, possibly a partial one
  2415.                saved with "~w".  Such a file is called a draft.  The
  2416.                file argument must be given, and in the current
  2417.                implementation all message headers must either be
  2418.                present in the file or must be added manually by the
  2419.                user.  At minimum, there must be a "To:" header; Mush
  2420.                will add "From:" and "Date:" headers when sending, if
  2421.                necessary.  To read a prepared text file that does not
  2422.                contain headers, use -H.  If the -U option is also
  2423.                given, then the letter is sent immediately without
  2424.                further editing.
  2425.  
  2426.  
  2427.           map[!] [string [expansion]]
  2428.           unmap[!] string
  2429.                The map command creates or lists macros for the line
  2430.                mode interface, and the map! command creates or lists
  2431.                macros for the message composition mode.  In either
  2432.                mode, macros act in such a way that, when string is
  2433.                typed, the effect is the same as if expansion had been
  2434.                typed instead.  The string is usually one or two
  2435.                control characters, or a sequence sent by one of the
  2436.  
  2437.  
  2438.  
  2439.      Page 37                                        (printed 12/21/90)
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2447.  
  2448.  
  2449.  
  2450.                "function keys" of a particular terminal.  See the
  2451.                MACROS section for the syntax used to specify the
  2452.                string and the expansion, and for comments on the
  2453.                interactions of macros in the same and in different
  2454.                modes.
  2455.  
  2456.                If no arguments are given, these commands will display
  2457.                the list of macros and expansions for the appropriate
  2458.                mode.  If only a string is given, they will display the
  2459.                expansion associated with that string for the
  2460.                appropriate mode.  Otherwise, they will create a macro,
  2461.                associating the given expansion with the specified
  2462.                string.
  2463.  
  2464.                Line mode macros are unset with the unmap command, and
  2465.                composition mode macros are unset with the unmap!
  2466.                command.
  2467.  
  2468.           merge [-N] folder-name
  2469.                Messages from the named folder are read into the
  2470.                current folder.  The header summaries of the merged
  2471.                messages are printed unless the -N option is given (see
  2472.                the folder command, above).  This command can only
  2473.                appear in a pipeline if it is the first command; it
  2474.                returns a list of all the messages from the merged-in
  2475.                folder.  This command cannot be used in initialization
  2476.                files before the shell has started.
  2477.  
  2478.           my_hdr/un_hdr [header]
  2479.                You can create personalized headers in your outgoing
  2480.                mail using this command.
  2481.  
  2482.                Command usage:
  2483.                  my_hdr  print all your headers
  2484.                  my_hdr header   print value of header
  2485.                  my_hdr header: string   set header to string
  2486.                  un_hdr header:  unset header
  2487.  
  2488.                To set a header, the first argument must be a string
  2489.                that contains no whitespace (spaces or tabs) and must
  2490.                end with a colon (:).  The rest of the command line is
  2491.                taken to be the text associated with the mail header
  2492.                specified.  If any quotes are used in the header and
  2493.                the header itself is not set in quotes, then quotes
  2494.                should be escaped (preceded) by a backslash.  This
  2495.                holds true for semicolons, pipe characters or any other
  2496.                metacharacter that Mush might interpret as a command
  2497.                line modifier.
  2498.  
  2499.                If the variable no_hdrs is set, then your headers will
  2500.                not be added to outgoing messages, but no headers will
  2501.                be unset.  The un_hdr command may take `*' as an
  2502.  
  2503.  
  2504.  
  2505.      Page 38                                        (printed 12/21/90)
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2513.  
  2514.  
  2515.  
  2516.                argument to un_hdr everything set.
  2517.  
  2518.                Example:
  2519.  
  2520.                  my_hdr Phone-Number: (415) 499-8649
  2521.  
  2522.                Mush treats the the header "From:" as a special case.
  2523.                If you have set your own From:, a simple test is
  2524.                performed to determine whether the address given is
  2525.                valid.  Any UUCP or domain address that directs mail to
  2526.                your login at the local machine should be acceptable,
  2527.                but certain configurations may prevent some
  2528.                combinations from being recognized.  If the address is
  2529.                valid, your From: header will be used; otherwise, an
  2530.                address known to be valid will be generated and used
  2531.                instead.  Some mail transport agents are "picky" and
  2532.                will not allow Mush to supply a From: header; in these
  2533.                cases, your From: header is silently removed at send
  2534.                time, and replaced with one generated by the MTA.
  2535.  
  2536.                Note:  You cannot set the "Date:".  Attempting to do so
  2537.                will not result in any error messages; your date will
  2538.                simply be overwritten by the system when your mail is
  2539.                sent.
  2540.  
  2541.           pick [flags] [<pattern>]
  2542.                Allows the user to select particular messages from a
  2543.                folder.  The <pattern> is a "regular expression" as
  2544.                described by ed.  If no arguments are given, the
  2545.                previous expression searched for is used.  You can
  2546.                search for messages from a user, for a particular
  2547.                subject line, between certain dates, and limit searches
  2548.                to a range of messages.  You can also find all messages
  2549.                that do not match the same arguments mentioned above.
  2550.  
  2551.                Options:
  2552.                  +<num>  keep only the first <num> messages matched (head).
  2553.                  -<num> keep only the last <num> messages matched (tail).
  2554.                  -ago <format>  search for messages relative to today's date.
  2555.                  -d [+|-]date  messages sent on or [+ after] [`-' before] date.
  2556.                  -e     take all remaining arguments to be the pattern.
  2557.                  -f     search for pattern in "From" field only.
  2558.                  -h header      search for pattern in specified header only.
  2559.                  -i     ignore case of letters when searching.
  2560.                  -r msg-list    search only the listed messages.
  2561.                  -s     search for pattern in "Subject" field only.
  2562.                  -t     search for pattern in "To" field only.
  2563.                  -x     select messages that do not match the pattern.
  2564.  
  2565.                The -ago option can be abbreviated as -a.  Only one of
  2566.                -a, -d, -f, -h, -s and -t can be specified at once.
  2567.                Entire messages are scanned for the <pattern> unless
  2568.  
  2569.  
  2570.  
  2571.      Page 39                                        (printed 12/21/90)
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2579.  
  2580.  
  2581.  
  2582.                -a, -d, -f, -h, -s or -t is specified.  Messages marked
  2583.                for deletion are also searched.  No patterns can be
  2584.                specified with the -a or -d options.  The -x option may
  2585.                not be used in conjunction with +n (head) and -n
  2586.                (tail).
  2587.  
  2588.                For the -d option, "date" is of the form:
  2589.  
  2590.                  month/day/year
  2591.  
  2592.                with an optional `-' to specify that the messages of
  2593.                interest are those older than that date.  Omitted
  2594.                fields of the date default to today's values.  Examples
  2595.                of selecting on date:
  2596.  
  2597.                  pick -d 4/20   on April 20, this year.
  2598.                  pick -d -/2/85        on or before the 2nd, this month, 1985.
  2599.                  pick -d +5/4   on or after May 4 of this year.
  2600.                  pick -d /      today only.
  2601.  
  2602.                At least one `/' char must be used in a date.  There is
  2603.                no strong date checking; 2/30 would be considered a
  2604.                valid date.
  2605.  
  2606.                For the -ago option, the format is very simple.
  2607.                Specify the number of days followed by the word "days",
  2608.                or the number of weeks followed by the word "weeks",
  2609.                and so on with months and years.  Truncation is
  2610.                allowed, since only the first character is examined, so
  2611.                all of the following are equivalent:
  2612.  
  2613.                  pick -ago 1 day, 2 weeks
  2614.                  pick -ago 2Weeks 1Day
  2615.                  pick -ago 2w,1day
  2616.                  pick -a 2w1d
  2617.  
  2618.                These examples will find all messages that are exactly
  2619.                2 weeks and 1 day old.  All "ago" dates collapse into
  2620.                "day" time segments.  This means that months are 30.5
  2621.                days long.  If more precise date selection is required,
  2622.                use the -d option and specify specific dates.
  2623.  
  2624.                Also note that the -ago option allows the "before" (-)
  2625.                and "after" (+) arguments.  Thus, you may pick all
  2626.                messages older than 1 week with:
  2627.  
  2628.                  pick -ago -1 week
  2629.  
  2630.                Other examples of pick:
  2631.  
  2632.                  pick -d 2/5/86 | pick -d -2/5/87 | pick -s "mail
  2633.                stuff" | lpr
  2634.  
  2635.  
  2636.  
  2637.      Page 40                                        (printed 12/21/90)
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2645.  
  2646.  
  2647.  
  2648.                Will find all the messages between the dates February
  2649.                5, 1986, and February 5, 1987, that contain the subject
  2650.                "mail stuff" and send them to the printer.
  2651.  
  2652.                  pick -s Re: | delete
  2653.  
  2654.                Deletes messages that have "Re:" in the Subject header.
  2655.  
  2656.                  folder +project | pick -f frank
  2657.  
  2658.                Finds all messages from frank in the folder described
  2659.                by +project.
  2660.  
  2661.                  pick -h return-path ucbvax
  2662.  
  2663.                Searches all messages that have the header "Return-
  2664.                Path:" and determines if the string "ucbvax" is in the
  2665.                header.  Note that case sensitivity applies only to the
  2666.                pattern searched, not the header itself.
  2667.  
  2668.                  pick -ago +1w | save +current
  2669.  
  2670.                This finds all messages that are a week or less old and
  2671.                saves them in the file called current, which is found
  2672.                in the user's folder variable.
  2673.  
  2674.                  pick +3 mush-users
  2675.  
  2676.                Finds the first three messages containing the string
  2677.                "mush-users".
  2678.  
  2679.                  eval -h "pick +2 -r .-$ -s %s" | pick -1
  2680.  
  2681.                Finds the next message with the same subject as the
  2682.                current message.
  2683.  
  2684.           pipe [-p pattern] [msg-list] unix-command
  2685.                Allows the user to send the texts of a list of messages
  2686.                to a UNIX(TM) command.  The list of messages may either
  2687.                be given explicitly or may come from a Mush pipeline
  2688.                (see "Piping commands" under the LINE-MODE INTERFACE
  2689.                section).  If a list is neither given nor piped, the
  2690.                current message is used.  All headers are considered
  2691.                part of the message text for purposes of this command
  2692.                unless the value of the variable alwaysignore includes
  2693.                the word "pipe" (see alwaysignore in the VARIABLES
  2694.                section for more information).  For example,
  2695.  
  2696.                    pipe 3 5 7 patch
  2697.  
  2698.                sends the text and headers of messages 3, 5 and 7 to
  2699.                the patch utility.
  2700.  
  2701.  
  2702.  
  2703.      Page 41                                        (printed 12/21/90)
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2711.  
  2712.  
  2713.  
  2714.                If a pattern is specified with the -p option, Mush will
  2715.                search the message for a line beginning with that
  2716.                string.  The matching line and all succeeding lines
  2717.                will be sent to the unix-command.  If -p is not given,
  2718.                and the unix-command is omitted, Mush will search for a
  2719.                line beginning with "#!" and feed that line and all
  2720.                succeeding lines to "/bin/sh".  Thus, pipe with no
  2721.                arguments treats the current message as a shell script.
  2722.  
  2723.                The pattern may also be of the form
  2724.                /pattern1/,/pattern2/ in which case printing will begin
  2725.                with the line containing pattern1 and end with the line
  2726.                containing pattern2 (inclusive).  Patterns of this form
  2727.                must still match at beginning of line, and regular
  2728.                expressions are not currently allowed.
  2729.  
  2730.                The pipe command can also be invoked as Pipe (note
  2731.                capitalization), in which case only the body of the
  2732.                messages, and none of the message headers, are sent to
  2733.                the unix command.
  2734.  
  2735.                When the variable unix is set, UNIX(TM) commands can
  2736.                appear anywhere except as the first command in a Mush
  2737.                pipeline without explicitly using pipe.  However, it is
  2738.                still necessary to specify Pipe in order to exclude all
  2739.                headers.
  2740.  
  2741.                Note:  All messages listed as arguments to pipe or Pipe
  2742.                are sent to the standard input of the same process as a
  2743.                continuous stream!  This is probably not desirable when
  2744.                extracting shell scripts in particular, so take care.
  2745.                Future revisions may provide an option to control this
  2746.                behavior.
  2747.  
  2748.           preserve
  2749.                (pre) Saves a message list in your spool directory
  2750.                rather than your mailbox unless it has been explicitly
  2751.                deleted.  The variable hold causes all messages to be
  2752.                held in your spool directory automatically.
  2753.  
  2754.           print
  2755.                (p, type, t) Takes a message list and displays each
  2756.                message on the user's terminal.  If the first letter of
  2757.                the command is a capital letter (`P' or `T') then
  2758.                "ignored" headers are not ignored provided that the
  2759.                variable alwaysignore is either not set or is set to
  2760.                one of its possible values.  If this variable is set
  2761.                with no value, the ignored headers will be ignored
  2762.                regardless of the command used to display the message.
  2763.                See the ignore command for more information about
  2764.                ignored message headers.
  2765.  
  2766.  
  2767.  
  2768.  
  2769.      Page 42                                        (printed 12/21/90)
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2777.  
  2778.  
  2779.  
  2780.                The `+' and the `-' keys can be used to display the
  2781.                "next" and "previous" messages respectively.  The `+'
  2782.                key has the caveat that the message is not paged at all
  2783.                and none of the messages headers are displayed.
  2784.  
  2785.           pwd  Prints the current working directory.
  2786.  
  2787.           quit (q) Updates the current folder and exits from Mush.  If
  2788.                the variable "hold" is set, all messages not marked for
  2789.                deletion are saved in the spool directory.  Otherwise,
  2790.                messages that have been read are saved to ~/mbox or to
  2791.                the file described by the string variable mbox.
  2792.                Messages marked for deletion are discarded.  Unread
  2793.                messages go back to the spool directory in all cases.
  2794.  
  2795.           reply/replyall [msg-list] [-r path] [flags] [users]
  2796.                (r/R) Messages are replied to by sending mail to the
  2797.                sender of each message in the given message list.  The
  2798.                command replysender is equivalent to reply.  Replyall
  2799.                responds to all the recipients as well as the sender of
  2800.                the message.  These commands understand all the same
  2801.                flags as the mail command.
  2802.  
  2803.                When constructing a return mail address to the author
  2804.                of a message, reply searches for special mail headers
  2805.                in the author's message that indicate the most
  2806.                efficient mail path for return mail.  Mush will search
  2807.                for the "Reply-To:", "Return-Path:", and "From:"
  2808.                headers, in that order, by default.
  2809.  
  2810.                If none of these fields are found in the message, the
  2811.                first line of the message is parsed if possible; this
  2812.                "From " line is different from the "From: " line.  If
  2813.                the user wishes to change the order or the actual
  2814.                fields to search for return paths, then the variable
  2815.                reply_to_hdr may be set to a list of headers to be used
  2816.                (in the order specified).  If it is set, but has no
  2817.                value, the first "From " line is used regardless of
  2818.                what headers the author's message contains.  The
  2819.                "From " line may be specified explicitly as an item in
  2820.                the list of reply-to headers by specifying the header:
  2821.                From_. See the VARIABLES section for more information
  2822.                about reply_to_hdr.
  2823.  
  2824.                When replying to all recipients of the message using
  2825.                the replyall (R) command, only the original author's
  2826.                address can be obtained from the message headers.
  2827.                There is no way to determine the best path to the other
  2828.                recipients of the message from message headers aside
  2829.                from taking their addresses directly from the "To:" and
  2830.                "Cc:" lines.
  2831.  
  2832.  
  2833.  
  2834.  
  2835.      Page 43                                        (printed 12/21/90)
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2843.  
  2844.  
  2845.  
  2846.                Example:
  2847.  
  2848.                  replyall 3,4,5 -i 4,5 7 -s response mail-group
  2849.  
  2850.                Here, messages 3, 4 and 5 are replied to (all the
  2851.                authors are obtained from each of those messages as
  2852.                well as the recipients from those messages) and the
  2853.                text from messages 4, 5 and 7 are included in the body
  2854.                of the reply.  The subject is set to "response" and the
  2855.                alias mail-group is appended to the list of recipients
  2856.                for this message.
  2857.  
  2858.                The -r flag will prepend the path to each recipient in
  2859.                the address list with the indicated path.  This
  2860.                overrides the value of auto_route, but has the exact
  2861.                same functionality.  See the explanation of the
  2862.                variable in the VARIABLES section.  Also see the MAIL
  2863.                ADDRESSES section for more information concerning
  2864.                replying to messages.
  2865.  
  2866.           save/write/copy [-f] [-s | -a] [msg-list] [filename / directory]
  2867.                (s/w) With no arguments, save and write will save the
  2868.                current message to the file mbox in the user's home
  2869.                directory (or the file specified by the mbox variable).
  2870.                If a message list is given, then the messages specified
  2871.                by the list are saved.  If a filename is given, then
  2872.                that filename is used instead of mbox.  The -s options
  2873.                forces the filename used to be that of the subject of
  2874.                the message.  Similarly, the -a option causes the
  2875.                filename used to be that of the author of the message
  2876.                being saved.  If more than one message is being saved,
  2877.                the subject or author name used is that of the smallest
  2878.                message number (since message lists have no order of
  2879.                precedence).  With these two options, a directory name
  2880.                may be given to specify a directory other than the
  2881.                current directory.
  2882.  
  2883.                If the file exists and is writable, the specified
  2884.                command will append each message to the end of the
  2885.                file.  If -f is given, then the file is overwritten
  2886.                causing whatever contents it contains to be lost.  For
  2887.                compatibility with older versions, the character `!'
  2888.                may be substituted for -f (no `-' is used with `!').
  2889.                If the current folder is the system mailbox, then saved
  2890.                messages are marked for deletion when the user exits
  2891.                using the quit command.  If the variable keepsave is
  2892.                set or the current folder is not the system mailbox,
  2893.                then messages are not marked for deletion.
  2894.  
  2895.                The write command differs from save and copy in that
  2896.                the message headers are not saved in the file along
  2897.                with the body of text.  The copy command is is like
  2898.  
  2899.  
  2900.  
  2901.      Page 44                                        (printed 12/21/90)
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2909.  
  2910.  
  2911.  
  2912.                save except that messages are never marked for
  2913.                deletion, whether or not keepsave is set.
  2914.  
  2915.                Because message lists are used to determine the
  2916.                messages to be saved, if the user wishes to save
  2917.                messages to a file that begins with a digit or any
  2918.                other message list metacharacter, a backslash should
  2919.                precede the filename to escape the message list
  2920.                expansion routine.  The backslash will not become a
  2921.                part of the filename.
  2922.  
  2923.           saveopts [file]
  2924.                The complement of source, saveopts, will save all
  2925.                settable variables, aliases and cmd's in the
  2926.                initialization file.  (See the INITIALIZATION section
  2927.                for more information on initialization files.)  If an
  2928.                argument is given, that file is used.  Beware that this
  2929.                will overwrite files, so any "if" expressions will be
  2930.                lost, as will settings that have changed since entering
  2931.                Mush.  Using saveopts is highly discouraged and is
  2932.                intended for the naive user only.
  2933.  
  2934.           set [[?]variable [= value]]
  2935.           unset variable
  2936.                With no arguments, set prints all variable values.
  2937.                Otherwise, it sets the named variable.  Arguments are
  2938.                of the form "variable=value" (whitespace is allowed).
  2939.                Boolean options such as autoedit need not have "=value"
  2940.                associated in the command.  Multivalued variables are
  2941.                set in the same way as other variables, and the list of
  2942.                values should be enclosed in quotes if whitespace is
  2943.                used to separate the items.  See the VARIABLES section
  2944.                for details of the format of each type of variable.
  2945.  
  2946.                The special command
  2947.  
  2948.                  set ?all
  2949.  
  2950.                will print all known variables utilized by the program
  2951.                and a brief description of what they do.  The user may
  2952.                set and manipulate his own set of variables, but
  2953.                internal variables that are utilized by the program are
  2954.                the only ones displayed.
  2955.  
  2956.                The command
  2957.  
  2958.                  set ?variable_name
  2959.  
  2960.                will print the same information for one variable
  2961.                instead of all variables.  You may unset everything by
  2962.                issuing the command "unset *".
  2963.  
  2964.  
  2965.  
  2966.  
  2967.      Page 45                                        (printed 12/21/90)
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  2975.  
  2976.  
  2977.  
  2978.                It is possible to set a variable to a list of messages
  2979.                returned by another command by using the piping
  2980.                mechanism.  For example,
  2981.  
  2982.                  pick -s Status Reports | set reports
  2983.  
  2984.                The variable reports now contains a message list which
  2985.                can be used as the message list argument to any command
  2986.                which accepts a list.
  2987.  
  2988.                  mail -i $reports boss
  2989.  
  2990.                This command will mail to "boss" and include the text
  2991.                of all the messages held in the reports variable.
  2992.  
  2993.           sh [command]
  2994.                Invokes an interactive version of the shell.  The shell
  2995.                spawned is described by the variable shell.  If the
  2996.                optional argument command is given, then that command
  2997.                is executed under the Bourne Shell.  If the special
  2998.                character `&' is at the end of any shell command, then
  2999.                the command will be executed in background.
  3000.  
  3001.           source [file]
  3002.                Read Mush commands from a file.  If no filename is
  3003.                specified, the files searched for are .mushrc or
  3004.                .mailrc in the user's home directory.  If the
  3005.                environment variable MUSHRC or MAILRC is set, then the
  3006.                file named by the variable is sourced instead.  If a
  3007.                filename is given on the command line, that file is
  3008.                sourced.  See the INITIALIZATION heading and the home
  3009.                variable descriptions for more information.
  3010.  
  3011.           sort [-i] [[-r] -a | -d | -l | -R | -s | -S]
  3012.                This command will sort messages according to author,
  3013.                date, status or subject (with or without considering
  3014.                the "Re: ", in replied messages).  In addition, the
  3015.                messages can be sorted in reverse order (same
  3016.                arguments).
  3017.  
  3018.                Options:
  3019.                  -i   ignore case in alphabetical sorts
  3020.                  -r   reverse sort order of next option
  3021.                  -a   sort by author (alphabetical)
  3022.                  -d   sort by date
  3023.                  -l   sort by length of message
  3024.                  -R   sort by subject including "Re:"
  3025.                  -s   sort by subject (alphabetical)
  3026.                  -S   sort by message status
  3027.  
  3028.                By default (no arguments), sort sorts messages by
  3029.                status.  New, unread messages are first, followed by
  3030.  
  3031.  
  3032.  
  3033.      Page 46                                        (printed 12/21/90)
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3041.  
  3042.  
  3043.  
  3044.                preserved messages, and finally deleted messages are
  3045.                placed at the end of the list.  If -r is the only
  3046.                option given, the status ordering is reversed.
  3047.  
  3048.                When sorting by date, the boolean variable
  3049.                date_received is checked.  If it is set, then sorting
  3050.                goes by date received.  Otherwise (default), sorting is
  3051.                by date sent by the original author.
  3052.  
  3053.                If more than one sort option is specified, they will be
  3054.                applied in left-to-right sequence to each comparison.
  3055.                Thus:
  3056.  
  3057.                  sort -a -d
  3058.  
  3059.                sorts messages by author and, if the author of any set
  3060.                of messages is the same, sorts within that set by date.
  3061.                Note that the -r option applies to only one other
  3062.                option at a time; to reverse the sort of both author
  3063.                and date requires:
  3064.  
  3065.                  sort -r -a -r -d
  3066.  
  3067.                The options can also be grouped:
  3068.  
  3069.                  sort -ra -rd
  3070.                  sort -rard
  3071.  
  3072.                Currently, only the line mode interface supports
  3073.                multiple sort criteria, but the other interfaces allow
  3074.                subsorting indirectly when appropriate actions are
  3075.                taken, as discussed below.
  3076.  
  3077.                It is also possible to sort a consecutive sublist of
  3078.                messages by using pipes.  If the mailbox were already
  3079.                sorted by author,
  3080.  
  3081.                  pick -f argv@zipcode.com | sort -s
  3082.  
  3083.                would find all messages from the user
  3084.                "argv@zipcode.com" and sort them by subject.  You may
  3085.                specify the exact message list by specifying that
  3086.                message list on the command line and using a pipe:
  3087.  
  3088.                  10-. | sort d
  3089.  
  3090.                This command means to sort the messages from 10 to the
  3091.                current message according to the date.
  3092.  
  3093.                To specify subsorting from with the curses interface,
  3094.                the temporary curses escape key must be used (the colon
  3095.                `:') and the command issued at the `:' prompt (as if
  3096.  
  3097.  
  3098.  
  3099.      Page 47                                        (printed 12/21/90)
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3107.  
  3108.  
  3109.  
  3110.                giving an "ex" command to "vi").  When the command is
  3111.                finished, the "...continue..." prompt is given and the
  3112.                user may continue or return to the top level of the
  3113.                curses mode.
  3114.  
  3115.                The sort range must consist of consecutive messages.
  3116.                Reversed sorting is not currently available in tool
  3117.                mode.
  3118.  
  3119.                If the variable sort is set, messages are sorted each
  3120.                time the user's system mailbox is read as the current
  3121.                folder.  The sort variable can be set either to nothing
  3122.                or to legal "sort" arguments.
  3123.  
  3124.                Note:  For compatibility with older versions, sort
  3125.                options are recognized even if they are not preceded by
  3126.                a `-'.  Also, if a `-' is given by itself (separated by
  3127.                spaces from any following arguments) it is interpreted
  3128.                as -r.
  3129.  
  3130.           stop For systems with job control, stop will cause Mush to
  3131.                send a SIGTSTP to itself.  The command was introduced
  3132.                to facilitate the stop-job action from a complex
  3133.                command line alias rather than the user having to type
  3134.                his stop character explicitly.
  3135.  
  3136.           top  Takes a message list and prints the top few lines of
  3137.                each.  The number of lines printed is controlled by the
  3138.                variable toplines and defaults to the size of the value
  3139.                of the variable crt. This command is ignored in the
  3140.                tool mode.
  3141.  
  3142.           undigest [-m] [-p pattern] [msg-list] [filename]
  3143.                A "digest" is a mail message which is a collection of
  3144.                other mail messages mailed to a "moderator" by other
  3145.                users.  The moderator compiles all the messages into a
  3146.                folder and sends the result to all the subscribers of
  3147.                the mailing list.  The undigest command disassembles
  3148.                the entries into the set of messages which comprises
  3149.                the digest.
  3150.  
  3151.                The -m option will merge these messages into the
  3152.                current folder.  Otherwise, if a filename is specified,
  3153.                a new folder is created and the user can change folders
  3154.                to read the messages separately.
  3155.  
  3156.                The -p option specifies an alternate pattern to be used
  3157.                as the digest article separator.  This pattern must
  3158.                match literally at the beginning of the line.  The
  3159.                default pattern is "--------" (eight hyphens).  This is
  3160.                the defacto USENET standard digest article separator
  3161.                and should work for most digests, but some use another
  3162.  
  3163.  
  3164.  
  3165.      Page 48                                        (printed 12/21/90)
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3173.  
  3174.  
  3175.  
  3176.                separator.  The -p option is also useful for "bursting"
  3177.                forwarded messages out of a wrapper message; for
  3178.                example:
  3179.  
  3180.                    undigest -m -p "--- Forward"
  3181.  
  3182.                will burst out messages forwarded by another user of
  3183.                Mush and merge them into the current folder.
  3184.  
  3185.                If a message list is specified, each digest in the list
  3186.                is disassembled to the same filename (if given).  If no
  3187.                filename is given and the user did not request a merge,
  3188.                then a temporary file is made.
  3189.  
  3190.           update [-r]
  3191.                Updates your current folder, writing back changes just
  3192.                as if you quit.  Headers are not listed when the folder
  3193.                is read back in.  The -r option puts the folder into
  3194.                read-only mode after updating it.
  3195.  
  3196.                See the folder command for complete information.
  3197.  
  3198.  
  3199.      VARIABLES
  3200.           Shell variables are controlled via the set and unset
  3201.           commands.  Options may be either boolean, in which case it
  3202.           is only significant to see whether or not they are set;
  3203.           string, in which case the actual value is of interest;
  3204.           numerical, in which case the numerical value is important;
  3205.           or multivalued, in which case they may be set to a list of
  3206.           values.  Some variables may have attributes of boolean and
  3207.           string or multivalued at the same time.
  3208.  
  3209.           If you or the program references a variable that is not
  3210.           explicitly set, then the environment variables are checked
  3211.           and that data is returned.
  3212.  
  3213.           Variable values can be modified by one of four variable
  3214.           modifiers, or by a numeric string.  The modifiers `:h',
  3215.           `:t', `:l' and `:u' may be applied to the variable names.
  3216.           The current implementation allows only one `:' modifier on
  3217.           each `$' expansion.
  3218.  
  3219.           :t   The variable is treated as a file path name, and the
  3220.                name of the file (the "tail" of the path) is
  3221.                substituted for the variable.  That is, everything to
  3222.                the right of the last `/' is returned.
  3223.  
  3224.           :h   The variable is treated as a path name, and the "head"
  3225.                of the pathname is substituted for the variable.  That
  3226.                is, everything up to, but not including, the last `/'
  3227.                is returned.
  3228.  
  3229.  
  3230.  
  3231.      Page 49                                        (printed 12/21/90)
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3239.  
  3240.  
  3241.  
  3242.           :l   All alphabetic characters in the variable's value are
  3243.                converted to lower case.
  3244.  
  3245.           :u   All alphabetic characters in the variable's value are
  3246.                converted to upper case.
  3247.  
  3248.           :number
  3249.                The value of the variable is converted to a list of
  3250.                space-separated words, which are numbered from one (1),
  3251.                and the word described by number is selected and
  3252.                returned.  It is not an error for number to be greater
  3253.                than the actual number of words; an empty string is
  3254.                returned in this case.
  3255.  
  3256.           Following is a list of all variables with predefined
  3257.           meanings.
  3258.  
  3259.           alwaysignore
  3260.                (Boolean/Multivalued) If set with no value, the mail
  3261.                headers set by the ignore command are always ignored.
  3262.                Normally, ignored headers are not ignored when sending
  3263.                messages to the printer, when interpolating messages
  3264.                into letters with ~f or ~I, when the `P' or `T' command
  3265.                is given (see the print command), or with the -I flag
  3266.                to the mail or reply commands.  Setting alwaysignore
  3267.                will ignore those headers even in the situations
  3268.                mentioned here.  No headers can be ignored during
  3269.                updates and when using the save command since the user
  3270.                may ignore headers that are required by Mush or any
  3271.                other mail system to read those folders.
  3272.  
  3273.                This variable can also be set to a list of words
  3274.                separated by commas or spaces.  Currently recognized
  3275.                words, and their meanings, are:
  3276.                    forward       Ignore headers when forwarding messages (~f).
  3277.                    include       Ignore headers when including messages (~I).
  3278.                    pipe        The pipe command ignores headers.
  3279.                    printer       The lpr command ignores headers.
  3280.  
  3281.                Also see the ignore command and the show_hdrs variable
  3282.                for more information.
  3283.  
  3284.           ask  (Boolean) If set, you will be prompted for a subject
  3285.                header for outgoing mail.  Use the tilde escape "~s" to
  3286.                set the header once in the message or specify the -s
  3287.                option on the mail command line at the Mush prompt.
  3288.  
  3289.           askcc
  3290.                (Boolean) If set, you will be prompted for a Cc (carbon
  3291.                copy) list when you are finished editing a letter to be
  3292.                sent.  If the variable edit_hdrs is set, prompting will
  3293.                not occur, but a Cc: line will be added to the edit
  3294.  
  3295.  
  3296.  
  3297.      Page 50                                        (printed 12/21/90)
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3305.  
  3306.  
  3307.  
  3308.                file.  This also applies to the tool mode.
  3309.  
  3310.           autodelete
  3311.                (Boolean) When exiting mail, all messages that have
  3312.                been read regardless of whether they have been marked
  3313.                for deletion are removed.  Only messages that haven't
  3314.                been read or that have been marked as preserved are not
  3315.                removed.
  3316.  
  3317.           autoedit
  3318.                (Boolean) If set, you are automatically put into your
  3319.                editor whenever you send or reply to mail.
  3320.  
  3321.           autoinclude
  3322.                (Boolean) When replying to any mail, a copy of the
  3323.                message being replied to is automatically inserted into
  3324.                your message body indented by the string described by
  3325.                the variable indent_str.
  3326.  
  3327.           autoprint
  3328.                (Boolean) After you delete a message, the next message
  3329.                is printed automatically.
  3330.  
  3331.           auto_route
  3332.                (Boolean/String) If set boolean (not to a string), all
  3333.                the recipients in a message that is being replied to
  3334.                (via replyall), will be routed through the path back to
  3335.                the original author.
  3336.  
  3337.                For example, if the original sender of a message came
  3338.                from the remote host c3p0 and the list of recipients
  3339.                looked like
  3340.  
  3341.                  From: c3p0!user1
  3342.                  To: yourhost!you
  3343.                  Cc: r2d2!user2, r2d2!user3
  3344.  
  3345.                then clearly, "user1" on the machine c3p0 can talk to
  3346.                your machine and the machine named r2d2.  However, you
  3347.                would not be able to respond to those users if your
  3348.                machine did not exchange UUCP mail with the host r2d2.
  3349.  
  3350.                Mush will attempt to solve this problem by
  3351.                reconstructing the addresses for "user2" and "user3"
  3352.                according to the address of the original sender,
  3353.                "c3p0".  The new addresses for "user2" and "user3"
  3354.                should therefore become
  3355.  
  3356.                  c3p0!r2d2!user2, c3p0!r2d2!user3.
  3357.  
  3358.                If your machine not only talks to c3p0, but talks to
  3359.                r2d2 as well, it becomes unnecessary to route the mail
  3360.  
  3361.  
  3362.  
  3363.      Page 51                                        (printed 12/21/90)
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3371.  
  3372.  
  3373.  
  3374.                through both c3p0 and r2d2.  So, the variable
  3375.                known_hosts may be set to a list of hosts which you
  3376.                know your machine to have UUCP mail connections with.
  3377.                This list is checked when constructing mail addresses
  3378.                for replies only and the shortest path is made by
  3379.                removing from the UUCP path those hosts that do not
  3380.                need to be called or are redundant.  See the entry for
  3381.                known_hosts for more information.
  3382.  
  3383.                If auto_route is set to a specific pathname (host names
  3384.                separated by !'s), all addresses in the reply will have
  3385.                this route prepended to their addresses.  This ignores
  3386.                the original path of the author.  This is quite useful
  3387.                for hosts which talk uucp to a node which is connected
  3388.                to the internet or uunet since both of those machines
  3389.                tend to be one-hop away from all other hosts (or
  3390.                reroute accordingly).  For example, if a message was
  3391.                addressed like so:
  3392.  
  3393.                  To: root@ucbvax.berkeley.edu, argv@zipcode.uucp
  3394.                  Cc: ucbcad!foo!bar
  3395.  
  3396.                If auto_route were set to "ucbcad", then replies to
  3397.                this address would be directed addressed like so:
  3398.  
  3399.                  To: ucbcad!ucbvax.berkeley.edu!root, ucbcad!zipcode.uucp!argv
  3400.                  Cc: ucbcad!foo!bar
  3401.  
  3402.  
  3403.                This assumes that the host in question talks uucp with
  3404.                ucbcad.  This example demonstrates several things.
  3405.                First, notice that all addresses are converted to
  3406.                uucp-style format.  Whenever routing is changed, the
  3407.                format is converted like this.  Secondly, note that the
  3408.                Cc: line did not change.  This is because all redundant
  3409.                hostnames from UUCP pathnames are removed to avoid
  3410.                unnecessary UUCP connections and speed up mail
  3411.                delivery.
  3412.  
  3413.                Another example of how auto_route truncates UUCP paths:
  3414.  
  3415.                  pixar!island!sun!island!argv
  3416.  
  3417.                Here, mail was probably originally sent to users at
  3418.                pixar and sun from somewhere undetermined now.  Since
  3419.                sun and pixar do not talk to each other, the users on
  3420.                those machines may have responded to mail creating the
  3421.                type of addresses stated above.  Here, it can be seen
  3422.                that we can reduce the path to the host island:
  3423.  
  3424.                  pixar!island!argv
  3425.  
  3426.  
  3427.  
  3428.  
  3429.      Page 52                                        (printed 12/21/90)
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3437.  
  3438.  
  3439.  
  3440.                See the MAIL ADDRESSES section for more detailed
  3441.                information about legal mail addresses.
  3442.  
  3443.                Note that the -r flag to reply and replyall overrides
  3444.                the value of auto_route.
  3445.  
  3446.           autosign
  3447.                (Boolean/string) Append a signature to outgoing mail.
  3448.                If this variable is set, but not to a string (e.g.,
  3449.                boolean-true) then the file ~/.signature is used.
  3450.  
  3451.                Otherwise, the variable is interpreted in one of four
  3452.                ways.  By default, the string is interpreted as a
  3453.                pathname relative to the current directory.  For this
  3454.                reason, it is advisable to use full pathnames here.  As
  3455.                usual, the special characters `~' and `+' are expanded.
  3456.                If a file is found, it is opened and its contents are
  3457.                read into the message buffer.
  3458.  
  3459.                If the variable is set to a string that begins with
  3460.                `$', then that string is interpreted as a user-
  3461.                definable variable and is expanded and appended to the
  3462.                letter.
  3463.  
  3464.                If the variable is set to a string that begins with a
  3465.                backslash (\) then the string itself (minus the `\'
  3466.                character) is used; no expansion is done and no files
  3467.                are read.
  3468.  
  3469.                Finally, if the variable is set to a string that begins
  3470.                with a vertical bar (or "pipe") character (|), the rest
  3471.                of the string is interpreted as a command whose output
  3472.                will be used as the signature.  The special characters
  3473.                `~' and `+' are NOT expanded in the command name, but
  3474.                the command is run via /bin/sh so $PATH will be
  3475.                searched and redirection can be specified.  The list of
  3476.                addresses to which the letter will be sent is passed to
  3477.                the command as its arguments, in the same form that
  3478.                they will be passed to the Mail Transport Agent (MTA).
  3479.                Depending on your MTA, each address may be followed by
  3480.                a comma.
  3481.  
  3482.                In the latter three cases, it is advisable to set the
  3483.                variable using single quotes to protect the `$', `\'
  3484.                and `|' characters from being interpreted.  Examples:
  3485.  
  3486.                  set autosign = '$foo'
  3487.                  set autosign = '\  Dan Heller zipcode!argv@ucbcad.berkeley.edu'
  3488.  
  3489.                Warning:  if redirection from the calling shell is
  3490.                used, no signature or fortune will be added to outgoing
  3491.                mail.  For example,
  3492.  
  3493.  
  3494.  
  3495.      Page 53                                        (printed 12/21/90)
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3503.  
  3504.  
  3505.  
  3506.                  % mush -s report manager < report_file
  3507.  
  3508.                In this command, mail is being sent to the user
  3509.                "manager" and the subject is set to "report" and the
  3510.                file "report_file" is being redirected as input.  In
  3511.                this case, there will be no signature appended.
  3512.  
  3513.                Note:  The `|' syntax for calling a program to sign the
  3514.                letter is a little counterintuitive and may change in
  3515.                future releases.
  3516.  
  3517.           autosign2
  3518.                (String) This alternate signature is available for
  3519.                special cases where the default signature is not
  3520.                desired or if no signature is desired for special
  3521.                addresses or if only special addresses require a
  3522.                signature.  The format for this variable is:
  3523.  
  3524.                  autosign2 = "address1, address2, ... : <signature>"
  3525.  
  3526.                Each address can be one of these types:
  3527.  
  3528.                1)  address
  3529.                     Legal mailing addresses that do not contain
  3530.                     comment fields (see the sections MAIL ADDRESSES
  3531.                     for more information on legitimate mail addresses)
  3532.                     will match literally.
  3533.  
  3534.                2)  *username
  3535.                     If the username is present on the recipient list,
  3536.                     regardless of what remote site the user may reside
  3537.                     on (including locally), the pattern matches.
  3538.  
  3539.                3)  !hostname !host1!host2...
  3540.                     Any user who appears as a recipient will match the
  3541.                     pattern provided he resides on the specified
  3542.                     hostname.  If a path of hosts is specified, then
  3543.                     the user must reside on the last host of the
  3544.                     specified path.
  3545.  
  3546.                4)  @sub.domain
  3547.                     The user must reside on any host within the domain
  3548.                     specified.  Neither the user or the hostname needs
  3549.                     to match; only the domain name must be required to
  3550.                     match.
  3551.  
  3552.                Example:
  3553.  
  3554.                  set autosign2 = "!zipcode @sun.com @mit.edu *schaefer root: --dan"
  3555.  
  3556.                This means that any mail sent to 1) anyone at zipcode,
  3557.                2) anyone within the sun domain, 3) anyone within the
  3558.  
  3559.  
  3560.  
  3561.      Page 54                                        (printed 12/21/90)
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3569.  
  3570.  
  3571.  
  3572.                mit domain, 4) Bart Schaefer (at any host anywhere --
  3573.                even locally), and 4) root on the local machine only
  3574.                (or, root@local-machine-name) will be signed with the
  3575.                "alternate" signature.  If any address on the recipient
  3576.                list fails to satisfy these four matches, the mail will
  3577.                be signed by my regular signature.
  3578.  
  3579.                One can have a local signature and a remote signature
  3580.                by specifying the autosign2 to include the hostname of
  3581.                the home machine the user is logged into.  Note the
  3582.                "zipcode" example above.
  3583.  
  3584.                The list of recipients, after alias expansion and
  3585.                comment removal, is then scanned and the following
  3586.                patterns are matched against those addresses specified
  3587.                in the autosign2 or fortunates variable according to
  3588.                these rules.
  3589.  
  3590.                The signature description is the same as described by
  3591.                autosign variable.  The colon (:) separates the list of
  3592.                addresses from the signature description.  If there is
  3593.                no colon or the address list is missing, the entire
  3594.                string is considered the signature (except for the
  3595.                colon).
  3596.  
  3597.                If autosign is not set, then autosign2 will ONLY work
  3598.                if the tilde command "~S" is specified.  In this way, a
  3599.                user may never have autosign set and just set autosign2
  3600.                to be some signature value.  The user may then issue
  3601.                the tilde command to automatically sign the letter.  If
  3602.                a list of addresses is given (terminated by a colon),
  3603.                then all recipients of the message must be in the list
  3604.                of addresses in autosign2; otherwise, the signature in
  3605.                autosign (if set) is used instead.  A null signature in
  3606.                autosign2 will not sign the letter.
  3607.  
  3608.                Example:
  3609.  
  3610.                  set autosign2 = "fred, barney, wilma, betty: ~/flintstone.sig"
  3611.  
  3612.                If a message is sent to:
  3613.  
  3614.                  To: fred, wilma
  3615.  
  3616.                Then the file ~/flintstone.sig will be used.  However,
  3617.                if the address were:
  3618.  
  3619.                  To: barney, betty, bambam
  3620.  
  3621.                Then autosign2 will not be used because bambam is not
  3622.                in the list.
  3623.  
  3624.  
  3625.  
  3626.  
  3627.      Page 55                                        (printed 12/21/90)
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3635.  
  3636.  
  3637.  
  3638.                Note that mail sent via redirection from the calling
  3639.                shell will not sign letters or append fortunes.
  3640.  
  3641.           cdpath
  3642.                (String) Set to a string of pathnames separated by
  3643.                spaces to use when searching for a directory when the
  3644.                cd command is issued.  If this variable is used, it is
  3645.                recommended that the path `.' be included.  Note that
  3646.                this differs from the csh, which does not require that
  3647.                `.' be present.
  3648.  
  3649.           cmd_help
  3650.                (String) This variable gives the path name of the
  3651.                general help file, which is read by the help command.
  3652.                This variable is normally reset only in the system
  3653.                initialization files, when the default location of the
  3654.                help file has changed.
  3655.  
  3656.           complete
  3657.                (String) Setting this variable enables word completion.
  3658.                The first character of the value of complete is used as
  3659.                the completion character; if complete is set, but not
  3660.                to a value, the escape character is used as the
  3661.                default.  When the completion character is typed at the
  3662.                end of a word prefix, Mush will interactively complete
  3663.                that word.  If the prefix is not unique, the word will
  3664.                be completed as far as possible and a bell will sound
  3665.                (see, however, the variable quiet).  If the word
  3666.                contains filename metacharacters, all possible matches
  3667.                will be completed.  If the list overflows the command
  3668.                line buffer, it will be truncated, so this feature
  3669.                should be used with care.  Metacharacters recognized
  3670.                are the same as in csh.
  3671.  
  3672.                The second character of the value of complete is used
  3673.                as the completion listing character.  When this
  3674.                character is typed, the possible completions will be
  3675.                printed, and Mush will prompt again with the original
  3676.                prefix.  If complete is set to only a single character,
  3677.                completion listing is disabled; if it is set with no
  3678.                value, control-D (^D) is used as the default listing
  3679.                character.
  3680.  
  3681.                See the description of the variable fignore for ways to
  3682.                exclude filenames from completions.
  3683.  
  3684.                Word completion is currently supported only for file
  3685.                names.  Command name and alias completion may be added
  3686.                in a future version.  Completion is not possible if the
  3687.                -e (-echo) flag was given, and is currently not
  3688.                available in tool mode.
  3689.  
  3690.  
  3691.  
  3692.  
  3693.      Page 56                                        (printed 12/21/90)
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3701.  
  3702.  
  3703.  
  3704.           crt  (Numeric) Set to a value that describes the number of
  3705.                lines a message must have before invoking the pager to
  3706.                view a message.
  3707.  
  3708.           crt_win
  3709.                (Numeric) Set to the height (in lines) of the message
  3710.                display window in tool mode.
  3711.  
  3712.           curses_help
  3713.                (String) This variable may be set to a space-separated
  3714.                list of curses mode command names (see the CURSES
  3715.                section for the possible choices).  If set but without
  3716.                a value, a default list established by your Mush
  3717.                maintainer is used.  When it is set, a display of the
  3718.                current bindings for the listed commands will appear at
  3719.                the bottom of the screen in curses mode.  This help
  3720.                display will normally shorten the display of headers,
  3721.                but the the user may explicitly scroll over the help
  3722.                display if he wishes to see more headers.
  3723.  
  3724.           cwd  (String) The current working directory string is
  3725.                automatically set upon startup of Mush and is reset
  3726.                each time the commands cd and pwd are called.  It may
  3727.                be changed or referenced like any other shell variable.
  3728.  
  3729.           date_received
  3730.                (Boolean) When message headers are printed, the date is
  3731.                normally shown is the time and date the sender sent the
  3732.                message.  If this variable is set, then the date
  3733.                displayed is the date received.
  3734.  
  3735.                When sorting messages by date, this variable is queried
  3736.                to determine whether the messages should be sorted by
  3737.                date sent or date received.
  3738.  
  3739.                Warning: For mailers that store messages without a line
  3740.                that starts with "From ", this option does nothing.
  3741.  
  3742.           dead (String) File to use instead of dead.letter when
  3743.                interrupted mail is saved.  May be set to a unix
  3744.                command by prefixing the value with `|'.  For more
  3745.                information, see the variable nosave.
  3746.  
  3747.           domain_route
  3748.                (Boolean/String) In combination with auto_route, this
  3749.                variable specifies that addresses containing a fully-
  3750.                qualified domain should be short-circuited to mail
  3751.                directly to the rightmost fully-qualified domain.  If
  3752.                set boolean (not to a string), only short-circuiting is
  3753.                done.  If set to a string, the address is rewritten to
  3754.                UUCP form and the value of the variable is prepended.
  3755.                Domain short-circuiting applies only to addresses
  3756.  
  3757.  
  3758.  
  3759.      Page 57                                        (printed 12/21/90)
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3767.  
  3768.  
  3769.  
  3770.                containing a fully-qualified domain, but short-circuits
  3771.                in spite of any path specified with the -r flag of
  3772.                reply or through the string value of auto_route (thus
  3773.                possibly omitting the auto_route or -r paths
  3774.                altogether).  See auto_route for more information.
  3775.  
  3776.           dot  (Boolean) Causes Mush to accept a `.' on a line by
  3777.                itself, in addition to `^D', to terminate messages.
  3778.  
  3779.           editor
  3780.                (String) Specifies the editor to use when the "~e"
  3781.                escape or the edit command is used.  Default is the
  3782.                value of the environment string EDITOR or the variable
  3783.                visual.
  3784.  
  3785.           edit_hdrs
  3786.                (Boolean) When in letter-composition mode (via mail or
  3787.                reply, etc), the headers of the outgoing message are
  3788.                stored in the same buffer as the text of the letter.
  3789.                So, if the editor is called to edit the message buffer,
  3790.                the headers of the message can be edited as well.
  3791.                However, there are some restrictions.
  3792.  
  3793.                There must be a To: header.  Without this, Mush will
  3794.                not deliver the letter.  Instead, the editor must be
  3795.                reentered and a To: header with a valid recipient must
  3796.                be inserted.  A valid Cc: header does not remove this
  3797.                restriction.  You may have as many To: and Cc: headers
  3798.                as you like.
  3799.  
  3800.                The From: header normally should not be changed.  If
  3801.                you change this header to an address that Mush is
  3802.                unable to identify as authentic, the original From:
  3803.                header will silently be put back.
  3804.  
  3805.                The Date: header will always be replaced by one with a
  3806.                more accurate time and date stamp.  Therefore, changing
  3807.                or removing this header has no effect.
  3808.  
  3809.                You cannot add a Status: header, and blank headers are
  3810.                dropped.  For example, if an empty Cc: header exists,
  3811.                the header will not show up in the outgoing message.
  3812.                Therefore, leaving empty headers has no effect.
  3813.  
  3814.                Aliases specified on the command line are expanded and
  3815.                put into the message buffer in their expanded form
  3816.                regardless of the value of no_expand. However, if the
  3817.                user changes the headers using the editor and specifies
  3818.                aliases, those aliases will not be expanded if
  3819.                no_expand is set.  Otherwise, they are expanded as
  3820.                usual.
  3821.  
  3822.  
  3823.  
  3824.  
  3825.      Page 58                                        (printed 12/21/90)
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3833.  
  3834.  
  3835.  
  3836.                The headers Bcc: and Fcc: are removed as expected.
  3837.  
  3838.                One added side effect of edit_hdrs is that you can add
  3839.                an Fcc: header to specify a "File Carbon Copy".  This
  3840.                must be a pathname to a file or program.  For programs,
  3841.                the pathname must be preceded by a pipe character (|).
  3842.                Note that all addresses on the Fcc: line that do not
  3843.                begin with `|' are interpreted as file names; don't put
  3844.                other kinds of addresses there.
  3845.  
  3846.                When using edit_hdrs, certain tilde escapes don't work.
  3847.                Specifically, any tilde escape that allows you to add
  3848.                or set headers or to empty the file are inactive.
  3849.                These functions are to be done in the editor only.
  3850.  
  3851.                Once a letter is being edited, edit_hdrs cannot be set
  3852.                or unset; the user must end the letter (either by
  3853.                sending it or forcefully terminating it) first.
  3854.  
  3855.                Header editing is required (and happens automatically)
  3856.                when using the "Compose" tool mode item.
  3857.  
  3858.           escape
  3859.                (Character) When composing a mail message (not in an
  3860.                editor), and the escape character is the first
  3861.                character on the line, the next character is examined
  3862.                and a corresponding function associated with that
  3863.                escape command is executed.  See tilde escapes for more
  3864.                information.
  3865.  
  3866.           fignore
  3867.                (String) This variable is tested when filename
  3868.                completion is used (see the variable complete for
  3869.                details).  The value of fignore may be a list of
  3870.                filename extensions (".c", ".o", etc.), a list of
  3871.                filename patterns containing metacharacters (*?{}[]),
  3872.                or a mixture of the two.  Each element in the list must
  3873.                be separated from the others by a space.  When a
  3874.                filename completion occurs, any filenames with the
  3875.                extensions listed in fignore, or matching the patterns
  3876.                given there, will be omitted from the completion.
  3877.  
  3878.                For example,
  3879.  
  3880.                    set fignore = ".o .s [Mm]ake*"
  3881.  
  3882.                will cause any filename ending in ".o" or ".s", and any
  3883.                filename beginning with "Make" or "make", to be
  3884.                excluded from completions.
  3885.  
  3886.                If all files in the current directory match the
  3887.                extensions or patterns, fignore is disabled and
  3888.  
  3889.  
  3890.  
  3891.      Page 59                                        (printed 12/21/90)
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3899.  
  3900.  
  3901.  
  3902.                completion will occur.  For this reason, it is usually
  3903.                not a good idea to include "*" in the list.
  3904.  
  3905.           folder
  3906.                (String) The folder variable is set to the path of a
  3907.                directory where folders are kept.  This path is used by
  3908.                various commands to expand the `+' metacharacter (see
  3909.                the folder command for details).  "~/Mail" is the
  3910.                default expansion of `+'.
  3911.  
  3912.           fortune
  3913.                (Boolean/string) If fortune is set, a random fortune is
  3914.                appended to the end of all outgoing mail using the
  3915.                UNIX(TM) command /usr/games/fortune (may vary from
  3916.                system to system).  If fortune is set to something that
  3917.                starts with a `-', then it is interpreted as a flag to
  3918.                fortune (e.g., "-o").  If fortune starts with a `/',
  3919.                then the program described by the string is executed
  3920.                (thus not doing fortune at all, if you want).  By
  3921.                default, fortune -s (short fortunes) is used.
  3922.  
  3923.           fortunates
  3924.                (String) When fortunes are added to messages, sometimes
  3925.                it is desirable to make sure that only a selected group
  3926.                of people get a fortune since certain people may not
  3927.                understand the messages at the end of your mail.
  3928.                Therefore, you can set a list of addresses (either pure
  3929.                addresses or aliases that are expanded to addresses) to
  3930.                be the only people who receive fortunes if one is to be
  3931.                appended.  Therefore, if the To: and Cc: lines contain
  3932.                only address listed in this string variable, then a
  3933.                fortune is appended to the message.  If those lists
  3934.                contain names that are not on the fortunates list, then
  3935.                no fortune is added.  This cannot be overridden; using
  3936.                the tilde command "~F" does not force a fortune to be
  3937.                added unless the individuals on the recipient list are
  3938.                all included in the fortunates list.  The list is made
  3939.                up of addresses or aliases separated by spaces or
  3940.                commas.  NOTE: fortune must be set in order for
  3941.                fortunates to work.
  3942.  
  3943.           hangup
  3944.                (Boolean) If this variable is set, Mush will update
  3945.                your folder before exiting when it receives a SIGHUP
  3946.                signal.  This is useful if you frequently read mail
  3947.                when dialed in over a noisy phone line that often drops
  3948.                carrier.
  3949.  
  3950.                WARNING:  Certain errors are ignored during this
  3951.                update, because it is presumed to be impossible to
  3952.                query the user for instructions.  Except in the event
  3953.                of a write error, the folder will be forced to contain
  3954.  
  3955.  
  3956.  
  3957.      Page 60                                        (printed 12/21/90)
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  3965.  
  3966.  
  3967.  
  3968.                exactly those messages that were not deleted at the
  3969.                time of the hangup.  In particular, this means that if
  3970.                an error occurs when loading new mail before the
  3971.                update, the new mail will be lost.  Write errors will
  3972.                still cause both the working tempfile and as much of
  3973.                the folder as possible to be preserved.
  3974.  
  3975.           hdr_format
  3976.                (String) This variable controls the format of the
  3977.                headers displayed by the headers command and in the
  3978.                curses and tool modes.  The format style of this
  3979.                variable string is similar to printf in C.  When
  3980.                printing the information, the variable is evaluated and
  3981.                each character in the string is echoed unless a `%'
  3982.                character is encountered.  If one is found, the
  3983.                following string substitutions are made:
  3984.  
  3985.                  %a      address of the author
  3986.                  %c      number of characters (bytes) in the message
  3987.                  %f      entire "From:" field (author)
  3988.                  %l      number of lines in the message
  3989.                  %i      the message-id (may not be present)
  3990.                  %n      name of the author
  3991.                  %s      subject of the message
  3992.                  %t      "To:" field (recipients)
  3993.                  %d      date and time of the message
  3994.                  %T      time only of the message
  3995.                  %N      day number of the month of the message
  3996.                  %W      day of the week (Sun, Mon, etc.)
  3997.                  %M      month name of the message
  3998.                  %Y      year of the message
  3999.                  %y      last two digits of %Y
  4000.                  %Z      time zone of the message
  4001.                  \n     a newline
  4002.                  \t     a tab
  4003.  
  4004.                A field width specifier may be used in all options.
  4005.                Thus, "%20f" will print the first 20 characters of the
  4006.                from line.  No matter what the formatting string, the
  4007.                message number followed by a `>' (for current message)
  4008.                is printed.
  4009.  
  4010.                The "address" and "name" of the author are extracted
  4011.                from the "From:" field of the message.  The name may be
  4012.                given in parentheses and the rest of the line is the
  4013.                address, or the address is given in angle brackets (`<'
  4014.                and `>') and the rest of the line is the name.
  4015.                Sometimes the address is the only thing on the line, in
  4016.                which case the name and address are the same.
  4017.  
  4018.                A special format is also provided to obtain the
  4019.                contents of any header not listed above.  If a format
  4020.  
  4021.  
  4022.  
  4023.      Page 61                                        (printed 12/21/90)
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4031.  
  4032.  
  4033.  
  4034.                of the form "%?header-name?" (both leading and
  4035.                following `?'  characters are required) appears in the
  4036.                value of hdr_format, the named header will be looked
  4037.                up.  For example,
  4038.  
  4039.                    set hdr_format = "%a %n %?phone?"
  4040.  
  4041.                causes the electronic address, name, and (if a "Phone:"
  4042.                header is present) phone number of the sender to be
  4043.                displayed.
  4044.  
  4045.           history
  4046.                (Numeric) This variable is set to the number of
  4047.                commands the shell interface will remember.  It is just
  4048.                like the history variable used in csh. If unset, the
  4049.                last command can always be referenced, but none other.
  4050.  
  4051.           hold (Boolean) Normally, on termination of mail, read
  4052.                messages are saved in your mbox (except those marked as
  4053.                preserved).  Setting hold prevents this from happening,
  4054.                and messages remain in /usr/spool/mail/user.  This does
  4055.                not apply to folders, obviously.
  4056.  
  4057.           home (String) This variable describes the user's home
  4058.                directory.  The variable is initialized to the value of
  4059.                the environment variable HOME, but can be modified at
  4060.                any time during the Mush session.  The home directory
  4061.                is the same directory where temporary files are kept
  4062.                for editing and so forth.  If the home directory cannot
  4063.                be found or read/write access is denied, an alternate
  4064.                directory, typically /tmp, is used.
  4065.  
  4066.           hostname
  4067.                (String) This is the name of your computer.  Currently,
  4068.                its sole usage is to compose a correct "From:" line for
  4069.                use with Mail Transport Agents that do not create this
  4070.                header automatically.  This will aid the recipients of
  4071.                your mail in replying to your messages.
  4072.  
  4073.                Note: the user should not have to set this variable
  4074.                since it should be set automatically by the system.
  4075.                However, it may happen that the system's hostname
  4076.                cannot be queried and the user may have to set this
  4077.                variable manually.
  4078.  
  4079.           ignore_bang
  4080.                (Boolean) If set, Mush will ignore the `!' character as
  4081.                a history reference.  Note that this severely limits
  4082.                use of the cmd facility, which depends upon history
  4083.                references for argument substitutions.
  4084.  
  4085.           ignoreeof
  4086.  
  4087.  
  4088.  
  4089.      Page 62                                        (printed 12/21/90)
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4097.  
  4098.  
  4099.  
  4100.                (Boolean/string) If set, `^D' will not exit from Mush.
  4101.                If set to a string, that string is executed as a
  4102.                command when `^D' is typed.  This does not effect
  4103.                termination of messages under the mail and reply
  4104.                commands.
  4105.  
  4106.           indent_str
  4107.                (String) When including messages into the text of a
  4108.                letter you are editing, each line of the messages is
  4109.                preceded by the value of indent_str.  If it is unset,
  4110.                the message body is indented by the string "> ".  See
  4111.                also the variables pre_indent_str and post_indent_str.
  4112.  
  4113.           in_reply_to
  4114.                (String) This variable may be set to a string that will
  4115.                complete the header "In-Reply-To:".  The format of this
  4116.                string is identical to the options for the variable
  4117.                hdr_format.
  4118.  
  4119.                For example, if the user were to respond to a message
  4120.                from Dan Heller that was sent on October 21, 1987, at
  4121.                10:39pm, with in_reply_to set to the string
  4122.  
  4123.                  %n's message as of %d.
  4124.  
  4125.                the header line
  4126.  
  4127.                  In-Reply-To: Dan Heller's message as of Oct 21, 1987, 10:39pm.
  4128.  
  4129.                would be added to the message.
  4130.  
  4131.           keepsave
  4132.                (Boolean) If set, the commands save and write will not
  4133.                mark messages for deletion.
  4134.  
  4135.           known_hosts
  4136.                (String) Used in conjunction with the variable
  4137.                auto_route, this variable is set to a list of hosts,
  4138.                separated by spaces, tabs, and/or commas, and describes
  4139.                the hosts with whom you know your machine shares UUCP
  4140.                connections.  When replying to mail, many times you
  4141.                will see that the return path constructed will have
  4142.                hostnames that your site could call, but instead the
  4143.                mail has been routed through a number of different
  4144.                machines first.
  4145.  
  4146.                For example, if you respond to mail that would mail to
  4147.                the path
  4148.  
  4149.                  unicom!pixar!root
  4150.  
  4151.                but your know your machine already calls pixar, then
  4152.  
  4153.  
  4154.  
  4155.      Page 63                                        (printed 12/21/90)
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4163.  
  4164.  
  4165.  
  4166.                sending the mail to unicom first is unnecessary.  If
  4167.                you have set your known_hosts string to include pixar
  4168.                in its list, the resulting address would look like
  4169.  
  4170.                  pixar!root
  4171.  
  4172.                Also see the command replyall for more information on
  4173.                constructing correct return addresses.
  4174.  
  4175.           logfile
  4176.                (String) Set to a filename which logs the headers of
  4177.                outgoing messages.  The message body of the message is
  4178.                not logged as it is for the record filename.  The
  4179.                logfile can be read as a folder to scan for the fact
  4180.                that messages have been sent.  If logfile and record
  4181.                are both set, then the logfile and the record files
  4182.                will match exactly.  In this case, the record file can
  4183.                be quickly scanned by scanning the log file instead.
  4184.  
  4185.                If set, but not to a string, the log file defaults to
  4186.                ~/mail.log.
  4187.  
  4188.           mail_icon
  4189.                (String) Set to a pathname for an alternate icon pixmap
  4190.                to use when the Mush tool is closed.  The number of
  4191.                messages in the mailbox is displayed as an icon label
  4192.                unless the string iconlabel appears as one of the
  4193.                values of the variable quiet.  See also the variable
  4194.                newmail_icon for the icon displayed when new mail
  4195.                arrives or is present.
  4196.  
  4197.           mbox (String) Set to the pathname of a file you'd like Mush
  4198.                to use as the default folder for read mail.  The
  4199.                default is ~/mbox.
  4200.  
  4201.           metoo
  4202.                (Boolean) When replying to mail, you are normally
  4203.                deleted from the list of recipients.  If metoo is set,
  4204.                you remain on the list.  See the alternates command for
  4205.                information on determining whether or not you're even
  4206.                on the list.
  4207.  
  4208.           mil_time
  4209.                (Boolean) Whenever the time is displayed in a message
  4210.                header or in the prompt, it can be displayed in either
  4211.                12-hour am/pm format, or in 24 hour military time
  4212.                format.  The default is the 12 hour format, but can be
  4213.                reset to use the 24 hour format by setting this
  4214.                variable.
  4215.  
  4216.           newline
  4217.                (Boolean/string) If set, carriage returns are ignored.
  4218.  
  4219.  
  4220.  
  4221.      Page 64                                        (printed 12/21/90)
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4229.  
  4230.  
  4231.  
  4232.                If set to a string, that string is executed as a
  4233.                command when a carriage return is typed.  Otherwise,
  4234.                carriage return prints the next undeleted message.
  4235.                newmail_icon (String) Set to a pathname for an
  4236.                alternate icon pixmap to use when new mail is
  4237.                available.
  4238.  
  4239.           no_expand
  4240.                (Boolean) When a Mush alias is used to reference a list
  4241.                of addresses, the list is expanded on the To: and Cc:
  4242.                lines to indicate the complete list of all the
  4243.                recipients of the message.  When no_expand is set,
  4244.                aliases are not expanded and the headers reflect the
  4245.                same information as typed by the user.
  4246.  
  4247.           no_hdrs
  4248.                (Boolean) If set, this variable tells Mush not to
  4249.                include your personalized mail headers in messages.
  4250.                This does not unset your headers, it just disables
  4251.                them.
  4252.  
  4253.           no_reverse
  4254.                (Boolean) In curses mode and in the tool mode, reverse
  4255.                video is not used to indicate the current message if
  4256.                this variable is set.  In the tool mode, if reverse
  4257.                video is not in use, text is displayed in "bold".
  4258.  
  4259.           nonobang
  4260.                (Boolean) If this variable is set, history references
  4261.                that don't match anything will be left unexpanded,
  4262.                rather than generating error messages.  This is useful
  4263.                if you want argument referencing in cmd expansions, but
  4264.                do not want to remember to escape every `!' you type in
  4265.                UUCP addresses.  It is also recommended for use with
  4266.                curses mode, because history is not kept for line mode
  4267.                escapes from that interface.
  4268.  
  4269.           nosave
  4270.                (Boolean) When composing a letter, the user can
  4271.                terminate the letter without sending it by using the
  4272.                tilde escape "~q" or by sending two "interrupt"
  4273.                signals.  When the message is terminated, a copy of it
  4274.                is saved to the file "dead.letter" in the user's home
  4275.                directory or to the file described by the variable
  4276.                dead.  If the variable nosave is set, then a backup
  4277.                copy of the message will not be saved.
  4278.  
  4279.           output
  4280.                (Read-only string) This variable holds a message list
  4281.                representing the output of the last successful command.
  4282.                This is useful for recovering from broken pipes or to
  4283.                capture the output of a command without affecting the
  4284.  
  4285.  
  4286.  
  4287.      Page 65                                        (printed 12/21/90)
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4295.  
  4296.  
  4297.  
  4298.                information it displays (some commands limit or
  4299.                suppress output when used in a pipeline).  Commands
  4300.                which return an error status (see the variable status)
  4301.                do not affect the value of output, but successful
  4302.                commands that return no message list will clear it.
  4303.                Also, many curses mode commands return an error status
  4304.                to indicate that the display has been altered, even if
  4305.                no actual error occurred.  This variable is thus most
  4306.                useful in line mode and in scripts.
  4307.  
  4308.           pager
  4309.                (String) If a message is longer than the number of
  4310.                lines that the variable crt is set to, then this
  4311.                program is executed to view a message.  If the user
  4312.                does not have this variable set, the user's environment
  4313.                PAGER is checked.  If this isn't set, then the default
  4314.                value for pager (set up by the system manager) is used.
  4315.                This may or may not be the internal pager.  To use the
  4316.                internal pager, you may set the variable pager to
  4317.                internal or to a null string.
  4318.  
  4319.           pre_indent_str
  4320.                (String) If this variable is set, when including the
  4321.                body of a message into an outgoing mail message (using
  4322.                the -i option to reply or mail, or when using the "~i"
  4323.                escape), a line preceding the first line of included
  4324.                text is printed using the string value of the variable.
  4325.                This string uses the same printf style formatting
  4326.                characters as the hdr_format variable.  For example,
  4327.                you could set pre_indent_str as follows:
  4328.  
  4329.                  set pre_indent_str = '[In the message entitled "%s",
  4330.                on %7d\n %n writes:]'
  4331.  
  4332.                You can then include a message body using "~i", and you
  4333.                might get something like this:
  4334.  
  4335.                  [In the message entitled "This is a test.", on Jan 19,
  4336.                   Dan Heller writes:]
  4337.                  > This is a test message to show how
  4338.                  > pre_indent_str might be used.
  4339.  
  4340.                This example assumes that the string value of
  4341.                  indent_str is not set.
  4342.  
  4343.           post_indent_str
  4344.                (String) This variable has the same function as
  4345.                pre_indent_str except that the string is inserted into
  4346.                the message body after the text of the included message
  4347.                rather than before.  The purpose of this variable is to
  4348.                complement the string described by the variables
  4349.                pre_indent_str and indent_str.  For example,
  4350.  
  4351.  
  4352.  
  4353.      Page 66                                        (printed 12/21/90)
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4361.  
  4362.  
  4363.  
  4364.                  set pre_indent_str = "/*"
  4365.                  set indent_str = " * "
  4366.                  set post_indent_str = " */"
  4367.  
  4368.                An included message might look something like this:
  4369.  
  4370.                  /*
  4371.                   * This is a test message to show how
  4372.                   * post_indent_str and pre_indent_str
  4373.                   * can work together with indent_str.
  4374.                   */
  4375.  
  4376.           printer
  4377.                (String) Used to set the default printer for the lpr
  4378.                command.
  4379.  
  4380.           print_cmd
  4381.                (String) This string should describe a UNIX(TM) command
  4382.                other than "lpr" for sending messages to the line
  4383.                printer.  Some people may choose to use a device
  4384.                independent troff style program, but virtually any UNIX
  4385.                command will suffice.  Common usage might include:
  4386.  
  4387.                  set print_cmd = 'ptroff -ms -Plp'
  4388.                  lpr .-$
  4389.  
  4390.                This command would send all messages from the current
  4391.                message to the last message through the ptroff command,
  4392.                supplying the appropriate arguments.
  4393.  
  4394.           prompt
  4395.                (String) You can set your prompt to tell you many
  4396.                different pieces of information.  By default, the
  4397.                prompt is set to the string
  4398.  
  4399.                  "Msg %m of %t: "
  4400.  
  4401.                If you have 10 messages and your current message is 5,
  4402.                then your prompt would look like:
  4403.  
  4404.                  Msg 5 of 10:
  4405.  
  4406.                The string value that prompt is set to will be printed
  4407.                as your prompt.  If the string contains a `%', then
  4408.                that character is ignored, the next character is
  4409.                evaluated and an appropriate value is printed in its
  4410.                place:
  4411.  
  4412.                  %F      full path name of the current folder
  4413.                  %f      name of the current folder (tail of %F)
  4414.                  %m      "current message" number
  4415.                  %t      total number of messages
  4416.  
  4417.  
  4418.  
  4419.      Page 67                                        (printed 12/21/90)
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4427.  
  4428.  
  4429.  
  4430.                  %n      number of "new" messages
  4431.                  %u      number of unread messages
  4432.                  %d      number of deleted messages
  4433.                  %T      current time (hours and seconds)
  4434.                  %N      today's date (Number of the day in the month)
  4435.                  %W      weekday name (Sun, Mon, Tue, ...)
  4436.                  %M      current month
  4437.                  %Y      this year
  4438.                  %y      last two digits of %Y
  4439.                  \n     a newline
  4440.                  \t     a tab
  4441.  
  4442.           quiet
  4443.                (Boolean/Multivalued) This variable tells Mush to be
  4444.                quiet in various circumstances.  If set, but not to any
  4445.                values, the currently running version of Mush is not
  4446.                printed on startup.  Otherwise, quiet may be set to one
  4447.                or more words separated by spaces or commas.  Currently
  4448.                recognized words are:
  4449.  
  4450.                    autosign        Suppress messages when appending signature.
  4451.                    await       Suppress await's bell for new mail.
  4452.                    complete        Suppress word completion error bells.
  4453.                    fkey        Suppress warnings about unset function keys.
  4454.                    fortune       Suppress messages when appending fortune.
  4455.                    iconlabel       Suppress showing message count as icon label.
  4456.                    newmail       Suppress new mail notification messages.
  4457.                    pick        Suppress descriptions of pick searches.
  4458.                    startup       Suppress the startup message.
  4459.                    tool        Suppress tool mode bell for new mail.
  4460.  
  4461.                Error conditions for signatures and fortunes are still
  4462.                reported.  See the variables autosign, complete, and
  4463.                fortune for more details.  The newmail setting does not
  4464.                prevent automatic inclusion of new mail, it only
  4465.                suppresses the announcement of its arrival, including
  4466.                tool mode bells.  The fkey setting applies only to tool
  4467.                mode.
  4468.  
  4469.           realname
  4470.                (String) Set to the name of the user.  The name is
  4471.                initialized to the value of the environment variable
  4472.                NAME upon invocation of the program.  If that isn't
  4473.                set, then the name is gotten from the password file if
  4474.                available.  If this variable wants to be reset or
  4475.                changed after the program has started, the user should
  4476.                issue the command:
  4477.  
  4478.                  set realname = "Your name here"
  4479.  
  4480.           record
  4481.                (String) Set to the name of a file to record all
  4482.  
  4483.  
  4484.  
  4485.      Page 68                                        (printed 12/21/90)
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4493.  
  4494.  
  4495.  
  4496.                outgoing mail.  This should be a full pathname or the
  4497.                current directory is searched.  The pathname may begin
  4498.                with `+' (indicating the user's ~/Mail directory or the
  4499.                value of the folder variable) or with a `~' (or
  4500.                "~user") indicating the user's home directory.
  4501.  
  4502.           reply_to_hdr
  4503.                (String) When replying to mail, Mush searches for
  4504.                return paths from the message by searching for the
  4505.                message headings "Reply-to", "Return-path", and
  4506.                "From:", in that order.  If none are found, then the
  4507.                first line of the message created by the delivery
  4508.                system is parsed and the address given there is used.
  4509.                This special message header is created by most mail
  4510.                delivery programs, but not all of them (MMDF, for one).
  4511.                This line is called the From_ header because it is a
  4512.                colon-less header, but contains the return address of
  4513.                the author of the message.  If the variable
  4514.                reply_to_hdr is set to a list of headers (delimited by
  4515.                spaces or commas), then that list is searched.  If none
  4516.                of the headers listed in the variable exist in the
  4517.                message, then a warning message is printed and the
  4518.                default headers are used.  The special case From_
  4519.                header can be specified as one of the headers to search
  4520.                for.
  4521.  
  4522.                  set reply_to_hdr = "sender reply-to return-path from_"
  4523.  
  4524.                This example shows that Mush will search for (in
  4525.                order), the headers listed in the reply_to_hdr
  4526.                variable.  If one header isn't found, then Mush looks
  4527.                for the next in the list.  If none of the headers in
  4528.                the list are found, the default headers (mentioned
  4529.                above) are searched.  The last header listed in the
  4530.                example is the special "From " header.  Also see the
  4531.                reply command.
  4532.  
  4533.           save_empty
  4534.                (Boolean) Normally, when all messages in a folder are
  4535.                deleted and the user updates the folder or changes to a
  4536.                new folder, the empty folder is deleted.  save_empty
  4537.                prevents the folder from being deleted and it is left
  4538.                zero length.  Note: the main system mailbox is never
  4539.                deleted, even when empty.
  4540.  
  4541.           screen
  4542.                (Numeric) May be set to the number of message headers
  4543.                to display at a time in the line and curses modes.
  4544.  
  4545.           screen_win
  4546.                (Numeric) May be set to the number of message headers
  4547.                to display in the tool mode.  A subwindow is created
  4548.  
  4549.  
  4550.  
  4551.      Page 69                                        (printed 12/21/90)
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4559.  
  4560.  
  4561.  
  4562.                for message headers, and its size is large enough to
  4563.                hold $screen_win headers.
  4564.  
  4565.           sendmail
  4566.                (String) If set, the program and arguments described by
  4567.                this variable will be executed to actually deliver mail
  4568.                sent by Mush.
  4569.  
  4570.           show_deleted
  4571.                (Boolean) If true, deleted message headers are
  4572.                displayed along with other messages (`*' indicates a
  4573.                deleted message) for the headers command.  Also,
  4574.                deleted messages can be displayed using any command
  4575.                which displays a message.  In curses mode, this
  4576.                variable is ignored and deleted messages are always
  4577.                displayed with other messages to facilitate undeleting
  4578.                messages.
  4579.  
  4580.           show_hdrs
  4581.                (Multivalued) Set to a list (space and/or comma
  4582.                separated) of headers that are to be the only headers
  4583.                displayed when viewing a message.  This variable
  4584.                disables the headers suppressed by the ignore command.
  4585.                For example,
  4586.  
  4587.                  set show_hdrs = "from date subject to cc"
  4588.  
  4589.                will only display the headers From: Date: Subject: To:
  4590.                Cc: in their entirety.
  4591.  
  4592.           sort (Boolean/string) The value of this variable is the same
  4593.                as the arguments to the sort command.  This variable is
  4594.                used for the initialization file to presort mail in the
  4595.                system mailbox upon entering Mush.  See the COMMANDS
  4596.                section for more information.
  4597.  
  4598.           squeeze
  4599.                (Boolean) Whenever messages are read, piped, or saved,
  4600.                if this variable is set, all consecutive blank lines
  4601.                are squeezed into one blank line.
  4602.  
  4603.           status
  4604.                (Read-only numeric) This variable records the success
  4605.                or failure status of the most recently executed
  4606.                command.  All line-mode commands return 0 (zero) for
  4607.                success and a negative value for error.  Some curses
  4608.                mode commands return an error status to indicate that
  4609.                the display has been corrupted, even when no actual
  4610.                error has occurred.  This variable is most useful in
  4611.                scripts to test the success of an operation before
  4612.                proceeding.
  4613.  
  4614.  
  4615.  
  4616.  
  4617.      Page 70                                        (printed 12/21/90)
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4625.  
  4626.  
  4627.  
  4628.           tmpdir
  4629.                (String) This variable describes the path to use as the
  4630.                directory for all tempfiles that Mush uses.  By
  4631.                default, the user's home directory is used.  If that
  4632.                cannot be accessed, a directory writable by all is used
  4633.                (typically, /tmp).  If tmpdir is set, then it is used
  4634.                first.
  4635.  
  4636.           thisfolder
  4637.                (Read-only string) The full path name of the current
  4638.                mailbox.  This variable cannot be modified or displayed
  4639.                by the set command; its value changes whenever a new
  4640.                folder is entered with the folder command.  During
  4641.                sourcing of the initialization files, thisfolder is not
  4642.                set, because the current folder has not yet been read.
  4643.                If you refer to "$thisfolder" in an initialization file
  4644.                (e.g., .mushrc), be sure to do so inside an "if
  4645.                $?thisfolder" test.
  4646.  
  4647.           toplines
  4648.                (Numeric) The number of lines of a message to print
  4649.                when the top command is issued.  If unset, $crt lines
  4650.                are printed.  Note that the message body only is
  4651.                printed when using the top command; message headers are
  4652.                not counted as lines since they are not displayed.
  4653.  
  4654.           unix (Boolean) If set, commands that are not Mush commands
  4655.                are considered to be UNIX(TM) commands.  This removes
  4656.                the inconvenience of requiring the user to do shell
  4657.                escapes to do quick UNIX commands.  For systems that
  4658.                support job control, SIGTSTP will stop the entire shell
  4659.                as well as the process being executed.  When SIGCONT is
  4660.                delivered, both will receive the signal and the shell
  4661.                will continue to wait for the job to finish.
  4662.  
  4663.                Due to the lack of real job control, input/output
  4664.                redirection and UNIX command piping, this mode of the
  4665.                shell is not intended to be used as a login shell.
  4666.  
  4667.                If a Mush command conflicts with a UNIX command, use
  4668.                the command sh to force execution as a shell command or
  4669.                use the full pathname of the command (e.g. starting
  4670.                with a '/').
  4671.  
  4672.                Warning:  Be aware that Mush pipes transmit message
  4673.                lists, NOT TEXT. You cannot pipe the output of UNIX
  4674.                commands to or from Mush commands or other UNIX
  4675.                commands with the Mush pipe mechanism.  You can,
  4676.                however, pipe Mush commands to a final UNIX command
  4677.                (see the pipe command for more information).  UNIX
  4678.                commands should be simple commands without pipes or
  4679.                metacharacters.
  4680.  
  4681.  
  4682.  
  4683.      Page 71                                        (printed 12/21/90)
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4691.  
  4692.  
  4693.  
  4694.                This feature is not available for the tool mode.
  4695.  
  4696.           verbose
  4697.                (Boolean) Passes verbose flag to mail delivery systems
  4698.                when sending mail, and causes Mush to print additional
  4699.                information about the sending process.
  4700.  
  4701.           verify
  4702.                (Boolean) When through editing messages, just before
  4703.                sending, verify will ask you if you want to send,
  4704.                continue editing, or abort the whole message
  4705.                altogether.
  4706.  
  4707.           version
  4708.                (Read-only String) The value of this variable is the
  4709.                version string, printed by Mush at startup (unless
  4710.                quiet is set) and included in the "X-Mailer:" header in
  4711.                messages.
  4712.  
  4713.           visual
  4714.                (String) May be set to the visual editor to use when ~v
  4715.                is specified.  Default is vi or the environment string
  4716.                VISUAL.  The visual editor is invoked by the -e
  4717.                arguments to the commands, respond and mail.
  4718.  
  4719.           warning
  4720.                (Boolean) If set, warning messages are printed when:
  4721.                  +o A command line alias ("cmd") looks like a command.
  4722.                    For example,
  4723.                      cmd mail 'set fortune; \mail'
  4724.                      cmd respond 'unset fortune; \respond;'
  4725.                  +o The date format of a message is unknown.
  4726.                    The date of a message is taken from the "Date:"
  4727.                    header.  If the date on that header is unknown,
  4728.                    other headers are searched for a valid date format
  4729.                    until a legal one is found.  This date may not be
  4730.                    correct in that it was the date the message was
  4731.                    received, not sent.
  4732.                  +o A variable is unset without first being set.
  4733.                    For example, if you give the command
  4734.                      unset metoo and the variable metoo is not set,
  4735.                    you will be notified that the variable is not
  4736.                    defined.
  4737.                  +o No header can be found for a digest article.
  4738.                    This occurs when the undigest command encounters
  4739.                    what appears to be an article separator but cannot
  4740.                    find a "From:" or "Date:" header in the following
  4741.                    text.
  4742.  
  4743.                The intent is so that users who are used to their own
  4744.                environments will be aware of changes in other
  4745.                environments should they be forced to use them.  There
  4746.  
  4747.  
  4748.  
  4749.      Page 72                                        (printed 12/21/90)
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4757.  
  4758.  
  4759.  
  4760.                may also be warning messages of failed routines or
  4761.                assertions that are not fatal enough to interrupt
  4762.                normal running of the program.
  4763.  
  4764.           wrap (Boolean) Normally, when the last message is deleted,
  4765.                the current message pointer remains pointing to the
  4766.                last message and the user is done reviewing his mail.
  4767.                If the wrap variable is set, the current message
  4768.                pointer will wrap around to the beginning of the user's
  4769.                messages again to the next undeleted message.  This
  4770.                also applies to the next command.
  4771.  
  4772.           wrapcolumn
  4773.                (Numeric) May be set to a column number at which line
  4774.                wrap will occur when composing messages.  If set, but
  4775.                given no value, column 78 will be assumed.  When Mush
  4776.                is able to determine the number of columns on your
  4777.                screen, it will enforce a maximum value for wrapcolumn
  4778.                of two less than that number of columns.  Line wrapping
  4779.                can be disabled either by unsetting wrapcolumn or by
  4780.                setting it with the explicit value of 0 (zero).
  4781.  
  4782.                Line wrapping occurs only at whitespace (spaces or
  4783.                tabs).  Lines containing no whitespace to the left of
  4784.                the specified column will not be wrapped.  If Mush was
  4785.                started with the -e (echo mode) option, or is in tool
  4786.                mode, line wrapping cannot be done due to I/O
  4787.                incompatibilities.
  4788.  
  4789.           In addition to the named variables described above, three
  4790.           special variable forms are recognized.
  4791.  
  4792.           $$   This string returns the process id (PID) of the current
  4793.                mush process.  Colon modifiers are not recognized for
  4794.                this special variable.
  4795.  
  4796.           $[%fmt]
  4797.                The string %fmt is interpreted as a header formatting
  4798.                string (as in the hdr_format variable) and is expanded
  4799.                using the headers from the current message.  Colon
  4800.                modifiers are allowed to follow the format.  For
  4801.                example,
  4802.  
  4803.                    save $[%4n]:l
  4804.  
  4805.                will save the current message in a file whose name is
  4806.                the first four characters of the name of the author,
  4807.                converted to lower case.
  4808.  
  4809.           $(%c)
  4810.                The string `%c' is interpreted as a prompt format (as
  4811.                in the prompt variable) and is expanded.  Colon
  4812.  
  4813.  
  4814.  
  4815.      Page 73                                        (printed 12/21/90)
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4823.  
  4824.  
  4825.  
  4826.                modifiers are allowed.  For example,
  4827.  
  4828.                    echo $(%T)
  4829.  
  4830.                will print the current time.  Note that "$(%F)" is
  4831.                equivalent to "$thisfolder".
  4832.  
  4833.           NOTE:  Evaluation of many "$[%...]" or "$(%...)" values in a
  4834.           single command is inefficient.  If expansion of several
  4835.           formats is desired, it is better to use the -h and -p
  4836.           options of echo or eval, which also provide better quoting
  4837.           of the interpolated strings.
  4838.  
  4839.      MUSH SCRIPTS
  4840.           One of the most useful features of Mush is the ability to
  4841.           write scripts of commands, which can be read by the source
  4842.           command from within Mush, or by redirecting input from the
  4843.           script and using the -i option.  If your operating system
  4844.           supports the "#!" interpreter mechanism, a script can be
  4845.           even be executed as a program.  Script files can use all the
  4846.           usual Mush commands; the only restriction is that the `!'
  4847.           history notation for referencing arguments of cmd aliases is
  4848.           disabled in scripts, so only very simple cmds will work.
  4849.  
  4850.           For example, a filtering file, "filter", might contain:
  4851.  
  4852.             set newfolder = /usr/spool/mail/$USER
  4853.             if is_shell
  4854.                 if -z $newfolder
  4855.                     set newfolder = $mbox   # mbox must be set!
  4856.                 endif
  4857.                 if -e $newfolder
  4858.                     folder $newfolder
  4859.                 else
  4860.                     quit
  4861.                 endif
  4862.             endif
  4863.  
  4864.             pick -f Mailer-Daemon | save mail_errors
  4865.             pick -f yukko | delete
  4866.             pick -s -i thesis | save +thesis_mail
  4867.             pick -t unix-wizards | +wizmail
  4868.             update
  4869.             sort d
  4870.  
  4871.           Then the first command the user types when beginning a Mush
  4872.           session might be "source filter", and the following would
  4873.           happen:
  4874.  
  4875.             First, a new variable called newfolder is set to the the
  4876.             user's spool mailbox (the system mailbox).  A test is made
  4877.             to see if the shell is running, because the folder command
  4878.  
  4879.  
  4880.  
  4881.      Page 74                                        (printed 12/21/90)
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4889.  
  4890.  
  4891.  
  4892.             can only be used from the shell.  Then a test is done to
  4893.             see the spool mailbox is zero length, and if it is, the
  4894.             variable is reset to the value of the user's mbox variable
  4895.             (mbox must already be set by this time or this will fail).
  4896.             A final test assures that the new folder exists.  If it
  4897.             does, Mush changes folders to the new folder.  If it
  4898.             doesn't exist, the program exits (via quit).
  4899.  
  4900.             Once the correct folder has been loaded, all messages that
  4901.             have "Mailer-Daemon" in the From header will be saved in
  4902.             the file mail_errors.  Then, all mail from the user
  4903.             "yukko" will simply be deleted.  Next, all mail that has
  4904.             in the Subject field, "thesis" (case ignored, so "Thesis"
  4905.             would also match) will be saved in the file
  4906.             $folder/thesis.  The next command will find all messages
  4907.             that are addressed to the group "unix-wizards" (of which
  4908.             the user is an elite member) and save them in the file
  4909.             $folder/wizmail.  Last, the folder will be updated,
  4910.             removing all deleted mail (saved mail may be marked as
  4911.             deleted) and the folder is reread and sorted according to
  4912.             the date of the messages.
  4913.  
  4914.           If the "#!" mechanism is supported, the "filter" script can
  4915.           be made into a program by adding as the first line:
  4916.  
  4917.               #! /usr/local/bin/mush -F
  4918.  
  4919.           (The actual location of mush may vary from system to system;
  4920.           /usr/local/bin is used as an example.)  Then make the file
  4921.           executable:
  4922.  
  4923.               chmod +x filter
  4924.  
  4925.           Now, when the command "filter" is typed at the user's
  4926.           regular shell prompt, the mush program will be invoked by
  4927.           the operating system.  Mush will first read the commands
  4928.           from the "filter" file and perform them, exactly as
  4929.           described above, and then will continue into the usual
  4930.           interface.  If it would be preferable for mush to exit after
  4931.           reading the script, the first line can be changed to:
  4932.  
  4933.               #! /usr/local/bin/mush -F!
  4934.  
  4935.           The -F! option should also be used when running scripts in
  4936.           the background or in other circumstances where the standard
  4937.           input cannot be a terminal, and the only commands to be
  4938.           executed are those in the script itself.
  4939.  
  4940.           Note that any additional arguments passed to a "#!" script
  4941.           are interpreted by mush; they are not passed along in any
  4942.           way that makes them accessible to the script.  Thus,
  4943.  
  4944.  
  4945.  
  4946.  
  4947.      Page 75                                        (printed 12/21/90)
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  4955.  
  4956.  
  4957.  
  4958.               % filter -f mbox
  4959.  
  4960.           would apply the commands in the "filter" script to the
  4961.           "mbox" folder.
  4962.  
  4963.      MACROS
  4964.           Macros are available in several different modes in Mush.
  4965.           Curses mode macros are created by using the bind command
  4966.           with the special function macro (or by using bind-macro,
  4967.           which is synonymous).  These macros are effective only when
  4968.           the curses interface is active.  Line mode macros are
  4969.           created with the map command, and are effective only in the
  4970.           line-oriented command interface.  Finally, composition mode
  4971.           macros are created with the map! command, and are effective
  4972.           only when composing mail messages.  Macros are not available
  4973.           in the tool mode, nor when composing messages from the tool
  4974.           mode.  Line and composition mode macros are also
  4975.           nonfunctional when Mush is started with the -e (echo)
  4976.           option.
  4977.  
  4978.           In general, macros consist of two parts:  a key sequence and
  4979.           an expansion.  The key sequence is the character or string
  4980.           of characters which, when typed in the appropriate mode, is
  4981.           recognized by Mush as a reference to a macro.  The expansion
  4982.           part of a macro is the string that will actually be "seen"
  4983.           by Mush when the key sequence is recognized.  Macros are
  4984.           like an interactive search-and-replace function; if a key
  4985.           sequence appears in the input, the associated expansion is
  4986.           substituted in its place.  Thus, if you create a macro whose
  4987.           key sequence is "^X^W" (control-X control-W) and whose
  4988.           expansion is "save", then when you hold down the control key
  4989.           and type the two characters `x' and `w', the effect will be
  4990.           as if you had actually typed the four characters `s', `a',
  4991.           `v' and `e'.  This is called "expanding" the macro.  More
  4992.           detailed examples of macros will be presented in the
  4993.           subsections for each mode in which macros can be used.
  4994.  
  4995.           Key sequences are usually made up of control characters or
  4996.           special strings of characters generated by "function keys,"
  4997.           but may in fact be almost any string the user desires.  Keys
  4998.           that generate a signal or an end-of-file from the keyboard
  4999.           (for example, on BSD systems, control-Z generates a TSTP
  5000.           signal and control-D generates an end-of-file) can never
  5001.           appear in key sequences, and macros in line or composition
  5002.           modes cannot begin with a newline, control-D, or any of the
  5003.           editing keys (erase, word-erase, line-erase, etc.).
  5004.           Otherwise, there are no restrictions.  It should be kept in
  5005.           mind, however, that for the line and composition modes, key
  5006.           sequences should be unusual characters or combinations of
  5007.           characters, not individual lower-case letters.  If common
  5008.           characters or strings are used for key sequences, much
  5009.           confusion can result when typing commands or messages.  This
  5010.  
  5011.  
  5012.  
  5013.      Page 76                                        (printed 12/21/90)
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5021.  
  5022.  
  5023.  
  5024.           is not important in the curses mode.
  5025.  
  5026.           In the line and composition modes, a timeout is used for key
  5027.           recognition; that is, once the first character of the key
  5028.           sequence has been typed, the succeeding characters must be
  5029.           typed after it relatively quickly, or Mush will fail to
  5030.           recognize them as a continuous sequence.  It is for this
  5031.           reason that key sequences are usually either very short, or
  5032.           are strings that are automatically generated by pressing a
  5033.           special key on the terminal.  On the other hand, the timeout
  5034.           can be used intentionally to prevent a macro from being
  5035.           expanded; simply type the first character of the macro, then
  5036.           wait for it to echo before typing the next.  This does not
  5037.           work in curses mode, because curses macros never "time out."
  5038.  
  5039.           In any mode, macros are recursive; that is, if the key
  5040.           sequence of one macro appears in the expansion of another
  5041.           macro (or even of the same macro), the second key sequence
  5042.           will be recognized when the first macro is expanded, and
  5043.           this new key sequence will also be expanded.  Great care
  5044.           should be taken when creating macros to be certain that
  5045.           recursive expansions do not happen unintentionally.
  5046.           Expansion can be prevented in line or composition modes by
  5047.           using a literal-next character.
  5048.  
  5049.           Literal-next characters may be used from the keyboard or
  5050.           embedded in expansions.  In either case, they prevent the
  5051.           next character from being interpreted as part of a key
  5052.           sequence.  Mush recognizes the literal-next character from
  5053.           the tty settings of the terminal, if the "new" BSD-style
  5054.           device driver is available; otherwise, `^V' (control-V) is
  5055.           recognized as a literal-next.  Note that, if you have a tty
  5056.           literal-next character, then when typing you will need to
  5057.           type two of them in order to send one to Mush; this is
  5058.           because the tty driver consumes the first one.  It is not
  5059.           necessary to use two literal-nexts in macro expansions
  5060.           unless you wish to cause the second literal-next to be
  5061.           literal.
  5062.  
  5063.           Backslash can be used as a literal-next when typing, and can
  5064.           sometimes be used as a literal-next in expansions; but use
  5065.           it with caution, because it also introduces escape sequences
  5066.           (see "Macro syntax," below).  There is no literal-next
  5067.           mechanism for curses mode.
  5068.  
  5069.           A macro will always abort whenever any command called by the
  5070.           macro returns an error.  This includes recursive expansions,
  5071.           so no matter how often a macro has recurred, it will be
  5072.           terminated completely.  Errors in curses mode include
  5073.           illegal cursor movements, such as up from the top of the
  5074.           screen or down from the last message.
  5075.  
  5076.  
  5077.  
  5078.  
  5079.      Page 77                                        (printed 12/21/90)
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5087.  
  5088.  
  5089.  
  5090.           Macro syntax.
  5091.  
  5092.           A special syntax is provided for specifying control
  5093.           characters and other non-printing characters in macro key
  5094.           sequences and expansions.  This syntax is the same as that
  5095.           for bindings, discussed in the CURSES INTERFACE section; it
  5096.           can be summarized as:
  5097.             \CX    control-X (where X is any capital letter)
  5098.             \E     the escape character
  5099.             \n     a newline (other C-style escapes also work)
  5100.  
  5101.           Thus, to create a line mode macro for control-X control-W,
  5102.           as in the example above, the command would be
  5103.  
  5104.               map '\CX\CW' save
  5105.  
  5106.           Also provided is a syntax for executing functions from
  5107.           within macros.  There are two special functions that are
  5108.           effective in all modes; these are getstr and getline.  Both
  5109.           of these functions interrupt expansion of the current macro,
  5110.           and wait for a newline-terminated string to be entered from
  5111.           the standard input.  This input string is inserted into the
  5112.           macro expansion.  The functions differ in that getline
  5113.           retains the newline character (carriage-return) at the end
  5114.           of the input string, whereas getstr strips off the newline
  5115.           (one must still be typed to terminate input).  These
  5116.           functions can be executed by surrounding their name with
  5117.           square brackets ([, ]); for example,
  5118.  
  5119.               map '\CX\CW' save [getline]
  5120.  
  5121.           creates a line mode macro, which is expanded when control-X
  5122.           control-W is typed, and which displays "save" followed by a
  5123.           space and then waits for the user to type a line of input;
  5124.           the input line will be used as the arguments to the save
  5125.           command.
  5126.  
  5127.           Additional functions are currently available only in the
  5128.           curses mode.  However, the syntax of enclosing the function
  5129.           name in square brackets applies to all functions, regardless
  5130.           of mode.  Note that ONLY the function name can appear in the
  5131.           brackets; no whitespace is allowed.
  5132.  
  5133.           Curses mode macros.
  5134.  
  5135.           Macros in curses mode are the most versatile, because they
  5136.           can access the full range of curses commands quickly and
  5137.           easily.  Every character that appears in the expansion part
  5138.           of a curses mode macro can reference a curses command or
  5139.           another macro.  Like other curses functions, curses mode
  5140.           macros are created with the bind command.  For example, to
  5141.           sort your messages by date and then send the most recent one
  5142.  
  5143.  
  5144.  
  5145.      Page 78                                        (printed 12/21/90)
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5153.  
  5154.  
  5155.  
  5156.           to the printer, you could use
  5157.  
  5158.               bind @ macro 'od$|'
  5159.  
  5160.           When the `@' key is typed, this macro first invokes sort
  5161.           (`o' from the default bindings) and instructs it to use date
  5162.           (d) for sorting; it then moves the current-message pointer
  5163.           to the last message ($) and prints that message (|).
  5164.  
  5165.           Admittedly, the above macro is somewhat cryptic, and is
  5166.           dependent upon the bindings for sort, last-msg, and lpr
  5167.           being set to the defaults.  It would be better, and possibly
  5168.           more understandable, to refer to the desired curses
  5169.           functions without using their key bindings.  To allow this,
  5170.           the "[function]" syntax described above may be used in
  5171.           curses mode macros to reference curses functions.  The only
  5172.           function that is prohibited from appearing in the "[]" is
  5173.           the special macro function, which cannot be called when it
  5174.           has no binding.  The example macro can therefore be
  5175.           rewritten as
  5176.  
  5177.               bind @ macro [sort]d[last-msg][lpr]
  5178.  
  5179.           Such references to curses functions may be made only in
  5180.           curses mode macros, and are effective only when Mush is
  5181.           actually in curses mode.  That may sound strange, but the
  5182.           most common use of curses macros is to quickly perform
  5183.           functions that require an escape to the line mode.  For
  5184.           example, although there is a variation of the curses mode
  5185.           mail function that will prompt for additional flags, there
  5186.           is no function to prompt for flags to be passed to reply.  A
  5187.           macro can easily be created to provide this:
  5188.  
  5189.               bind R macro '[line-mode]reply '
  5190.  
  5191.           This macro binds `R' to perform an escape to line mode and
  5192.           type the string "reply" followed by a space.  Macro
  5193.           expansion then ends, leaving it up to the user to supply
  5194.           flags to the command or to backspace over it if a different
  5195.           command (or none) is desired.  Of course, the macro could
  5196.           also have provided some default arguments:
  5197.  
  5198.               bind R macro '[line-mode]reply -ei '
  5199.  
  5200.           Note that, if the getline or getstr function is used in a
  5201.           line-mode escape, it is not possible to erase the text that
  5202.           is typed before the get; that is, if the macro had been
  5203.  
  5204.               bind R macro '[line-mode]reply -ei [getline]'
  5205.  
  5206.           then the user would be forced to use the -ei flags.
  5207.  
  5208.  
  5209.  
  5210.  
  5211.      Page 79                                        (printed 12/21/90)
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5219.  
  5220.  
  5221.  
  5222.           Line mode macros.
  5223.  
  5224.           Line mode macros combine some of the convenience of single-
  5225.           keystroke commands with the versatility of the line-oriented
  5226.           text interface.  As has been noted, the choice of characters
  5227.           for line mode key sequences should be made carefully, so as
  5228.           not to interfere with normal typing.  Line mode macros are
  5229.           created with the map command; for example, suppose you
  5230.           frequently forward messages to a friend named "fred."  You
  5231.           could create a macro to do this:
  5232.  
  5233.               map '\CF' 'mail -f . fred\n'
  5234.  
  5235.           This macro causes the single keystroke `^F' (control-F) to
  5236.           forward the current message to "fred."  Note the newline
  5237.           character "\n" at the end of the expansion; this causes the
  5238.           command to be executed immediately, without you having to
  5239.           type a carriage-return.
  5240.  
  5241.           The expansion part of a line mode macro will echo to the
  5242.           screen when it is expanded, so you can see what the macro is
  5243.           doing.  You can therefore use parts of the expansion as a
  5244.           "prompt."  In the above example, suppose you wished to enter
  5245.           a message list rather than always forwarding the current
  5246.           message.  Change the macro to:
  5247.  
  5248.               map '\CF' 'mail -f [getstr] fred\n'
  5249.  
  5250.           This version of the macro prints "mail -f" and a space, then
  5251.           waits for a newline-terminated string from the standard
  5252.           input.  The newline is stripped, and the string is used as
  5253.           the message list passed to the "mail -f" command.  The
  5254.           address "fred" is also passed to mail, so the messages in
  5255.           the list are forwarded to fred.
  5256.  
  5257.           If you want to be able to "change your mind" after starting
  5258.           a line mode macro, you must leave the "\n" out of the
  5259.           expansion.  Without the newline, the macro will not be
  5260.           executed immediately, so you have a chance erase the line
  5261.           (or part of it) and type something different.  Remember that
  5262.           the getline function keeps the newline in the string it
  5263.           gets, so if you don't want a newline to appear, you must use
  5264.           getstr.  When using the get functions, you should also
  5265.           remember that you can never backspace past the "beginning"
  5266.           of a getline, and you can backspace past the beginning of a
  5267.           getstr only after the get has been completed.
  5268.  
  5269.           When the getstr function is used in line mode macros, Mush
  5270.           will reprint the current input line so you can see what the
  5271.           whole thing looks like, but will not redisplay the line mode
  5272.           prompt (see the entry for prompt in the VARIABLES section
  5273.           for information on what the prompt looks like).  Don't let
  5274.  
  5275.  
  5276.  
  5277.      Page 80                                        (printed 12/21/90)
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5285.  
  5286.  
  5287.  
  5288.           this worry you.  The input line is also reprinted when
  5289.           getline is used, but the newline in the input string usually
  5290.           results in a new prompt being displayed.
  5291.  
  5292.           NOTE:  Line mode macros are not available when using the
  5293.           line-mode escape function in curses mode.  It is necessary
  5294.           to escape all the way to line mode (that is, leave curses
  5295.           mode by typing carriage-return at the `:' prompt) in order
  5296.           to access line mode macros.  This is to prevent possible
  5297.           confusion when similar macros exist in both line and curses
  5298.           modes.
  5299.  
  5300.           Composition mode macros.
  5301.  
  5302.           Composition mode macros are very similar to line mode
  5303.           macros, and provide a "power typing" function when composing
  5304.           messages.  For example, you might want to have the word
  5305.           "percent" inserted into your message whenever you hit the
  5306.           `%' key:
  5307.  
  5308.               map! % percent
  5309.  
  5310.           Another use is to simulate the indentation features of
  5311.           editors.  For example, you might
  5312.  
  5313.               map! '\CT' '    '
  5314.  
  5315.           (where the expansion is four spaces, enclosed in single
  5316.           quotes).  This macro causes four spaces to be inserted into
  5317.           the message whenever control-T is typed.
  5318.  
  5319.           Composition mode macros can also be used to execute tilde-
  5320.           escapes (see the GENERAL USAGE section for a list of these).
  5321.           For example, you could create a macro to invoke the editor:
  5322.  
  5323.               map! '\CE' '\n~v\n'
  5324.  
  5325.           When control-E is typed, this macro prints a newline (to be
  5326.           sure that the tilde-escape is the first thing on a line),
  5327.           then types "~v" followed by another newline, to start the
  5328.           editor.  Similar macros can be created for other tilde-
  5329.           escapes.
  5330.  
  5331.           Mixed mode macros.
  5332.  
  5333.           It is not normally possible to mix macros among the
  5334.           different modes.  However, once expansion has begun, it is
  5335.           interrupted only by an error or by the appearance of one of
  5336.           the special get functions.  It is therefore possible to have
  5337.           a macro expansion which causes the mode to change before the
  5338.           expansion has completed.  In this case, recursive expansions
  5339.           will apply to the new mode.  Suppose we are using a
  5340.  
  5341.  
  5342.  
  5343.      Page 81                                        (printed 12/21/90)
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5351.  
  5352.  
  5353.  
  5354.           variation of the editor-starting macro shown above for
  5355.           composition mode:
  5356.  
  5357.               map! '\CE' '\n~v emacs\n'
  5358.  
  5359.           This macro causes the "emacs" editor to be started when
  5360.           control-E is typed in composition mode.  We can now create a
  5361.           line mode macro that makes use of this composition mode
  5362.           macro:
  5363.  
  5364.               map '#' 'reply -i [getline]~t[getline]\CE'
  5365.  
  5366.           When the `#' key is pressed in line mode, this macro will
  5367.           print "reply -i" and wait for a message list, then enter
  5368.           composition mode (by executing the reply command).  In
  5369.           composition mode, it will display the To: line (the "~t"
  5370.           escape) and wait for other addresses to be added.  Finally,
  5371.           it will recursively expand the control-E macro, to start
  5372.           editing the message with emacs.
  5373.  
  5374.           As can be seen from this example, the Mush macro facility is
  5375.           very powerful.  Be very careful not to accidentally expand
  5376.           recursive macros, especially when using macros that change
  5377.           modes.  When testing new macros, it is a good idea to start
  5378.           Mush in read-only mode (the -r command line flag) to be sure
  5379.           that messages are not lost or altered.
  5380.  
  5381.           Getting rid of macros.
  5382.  
  5383.           It is not necessary to delete a macro in order to redefine
  5384.           it.  New expansions for existing key sequences will
  5385.           automatically replace the old expansions.  If it is
  5386.           necessary to remove a macro completely, the commands unbind,
  5387.           unmap and unmap! can be used to remove curses mode, line
  5388.           mode, and composition mode macros, respectively.  Remember
  5389.           to use a backslash or other literal-next character to
  5390.           prevent the expansion of line mode macros when using these
  5391.           commands, especially unmap.
  5392.  
  5393.      MAIL ADDRESSES
  5394.           Whenever a command that requires a user address or set of
  5395.           addresses is specified (mail, reply, alias, etc) the
  5396.           addresses given must be separated by commas.  Most casual
  5397.           users specify addresses that contain no comments or
  5398.           whitespace.  The simplest addresses are just the login names
  5399.           of the users you wish to send your message to:
  5400.  
  5401.             mail fred barney wilma betty
  5402.  
  5403.           In these cases, Mush can figure out that they are separate
  5404.           addresses and insert commas between addresses automatically.
  5405.  
  5406.  
  5407.  
  5408.  
  5409.      Page 82                                        (printed 12/21/90)
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5417.  
  5418.  
  5419.  
  5420.             To: fred, barney, wilma, betty
  5421.  
  5422.           Addresses may also contain `!', `@' and `%' characters which
  5423.           are used to separate hostnames and the final user name from
  5424.           each other.  This is primarily used to mail to users on
  5425.           other machines.  UUCP addresses are specified as
  5426.  
  5427.             host1!host2!user
  5428.  
  5429.           where there may be as many hosts as necessary to route the
  5430.           message to the recipient user.  Here, the user's account is
  5431.           on "host2" and that machine is connected to "host1".  Domain
  5432.           addresses (also called Arpanet, Internet, RFC822, and "fully
  5433.           qualified" addresses) are specified as
  5434.  
  5435.             user@host.domain
  5436.             user%host2.domain@host1
  5437.  
  5438.           where "domain" is a domain name such as ".berkeley.edu" or
  5439.           ".com".  As in the first example, the user is on "host2",
  5440.           but that machine talks to "host1".  It is beyond the scope
  5441.           of this document to discuss in detail the ramifications of
  5442.           inter-network mailing.  More information can be obtained
  5443.           through your system manager.
  5444.  
  5445.           Mush understands addresses containing a comment field.
  5446.           Comment fields do not affect the destination address of mail
  5447.           being sent.  These fields are purely for human legibility
  5448.           and may be specified according to the following constraints:
  5449.  
  5450.           Anything within angle brackets is an address; whatever is
  5451.           outside of the address is considered a comment:
  5452.  
  5453.             Dan Heller <zipcode!argv@cad.berkeley.edu>
  5454.             Dan Heller <argv@zipcode.com>
  5455.  
  5456.           Anything that has parentheses is a comment; whatever is
  5457.           outside of the parentheses is considered the address:
  5458.  
  5459.             zipcode!argv (Dan Heller)
  5460.             argv@zipcode.com (Dan Heller)
  5461.  
  5462.           Double quotes (") are treated just like parentheses:
  5463.  
  5464.             "Dan Heller" zipcode!argv
  5465.             "Dan Heller" argv@zipcode.com
  5466.  
  5467.           If the comment is to contain a comma, the first case above
  5468.           may not be used; you must use either the parenthesis or
  5469.           double-quote cases.
  5470.  
  5471.             fred@flintstone.bed.rock (Fred Flintstone, Cave Man)
  5472.  
  5473.  
  5474.  
  5475.      Page 83                                        (printed 12/21/90)
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5483.  
  5484.  
  5485.  
  5486.           If the comment contains unbalanced quotes, unpredictable
  5487.           results may occur (Mush won't deliver the mail).
  5488.  
  5489.           Since the angle brackets have the highest precedence, quotes
  5490.           or parentheses may be used in conjunction with one another.
  5491.  
  5492.             Yabba Dabba Doo (Fred Flintstone) <fred>
  5493.             Scoobie "Doobie" Doo <scooby@shaggys.mystery.machine>
  5494.  
  5495.           Multiple addresses may appear on a line:
  5496.  
  5497.             argv@zipcode.com argv@garp.mit.edu dheller
  5498.  
  5499.           Because there is no indication of comments (parenthesis,
  5500.           angle bracket, or quotes), it is assumed that these are
  5501.           separate addresses and Mush will insert commas between these
  5502.           addresses accordingly.  It is for this reason that the user
  5503.           is encouraged to explicitly insert commas between all mail
  5504.           addresses and not depend on the automation of comma
  5505.           insertion to correctly separate addresses from one another.
  5506.  
  5507.           Mail aliases may contain addresses of the form described
  5508.           above.
  5509.  
  5510.             alias george    George Jetson <george@spacely.space.sprockets>
  5511.             alias jane      Jane Jetson <jane@sky-high.appts>
  5512.             alias group     george, jane
  5513.  
  5514.           You can mail using the alias as an address and it will be
  5515.           expanded accordingly.  You cannot, however, reference an
  5516.           alias and specify a comment or another address at the same
  5517.           time.
  5518.  
  5519.             To: The Jetsons <group>
  5520.  
  5521.           The alias "group" will not be expanded because the angle
  5522.           brackets causes it to be considered as another address
  5523.           entirely.
  5524.  
  5525.      FILES
  5526.           /usr/spool/mail/*       Directory for incoming mail
  5527.           ~/Mail  Default folder directory
  5528.           ~/mbox  File where old mail is saved
  5529.           ~/.mushrc       File giving initial Mush commands
  5530.           ~/.mailrc       Alternate initialization file
  5531.           ~/.edXXXXXXX    Temporary for file for outgoing messages
  5532.           ~/.mushXXXXXX   Temporary mail file (copy of current folder)
  5533.  
  5534.           Temporary files that are created by the program are always
  5535.           created with read/write access to the owner only; group and
  5536.           other permissions are never set.  This is also true for the
  5537.           /usr/spool/mail/* files.  All other files created by the
  5538.  
  5539.  
  5540.  
  5541.      Page 84                                        (printed 12/21/90)
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5549.  
  5550.  
  5551.  
  5552.           user via commands internal or external to the program have
  5553.           permissions set by the user's default umask.  If the umask
  5554.           is reset within the program, the mask remains intact even
  5555.           after exiting.  Remember to set the variable unix before
  5556.           attempting to set the umask value.
  5557.  
  5558.           If your system is using Sun Microsystem's NFS, take special
  5559.           note to read the manual page for mount(C).  Filesystems
  5560.           mounted for read/write access should be mounted as "hard"
  5561.           NFS mounts or you may lose mailboxes during a timeout during
  5562.           a write or update.
  5563.  
  5564.           Filesystems that use RFS still have bugs to be ironed out in
  5565.           the way of owners and permissions concerning utime(2).
  5566.  
  5567.      SEE ALSO
  5568.           Mail(C), binmail(C), csh(C), aliases(5), mount(C),
  5569.           mailaddr(F), sendmail(?), printf(S), execl(S), umask(C),
  5570.           utime(S).
  5571.  
  5572.      AUTHOR
  5573.           The original Mush was written entirely by Dan Heller.  Code
  5574.           to support macros, line wrapping, and a whole lot of other
  5575.           miscellaneous details, was written by Bart Schaefer, who
  5576.           gets his name in print because he updated and proofread this
  5577.           manual.  Numerous others have supplied valuable suggestions
  5578.           and assorted bits and pieces.
  5579.  
  5580.           argv@sun.com       zipcode!argv
  5581.  
  5582.           Installation on this system, plus Dos(TM) and OS/2(TM) port,
  5583.           by Mike O'Carroll <lmoc@ee.leeds.ac.uk>
  5584.  
  5585.      DISCLAIMERS
  5586.           Mush contains no UNIX(TM) sources and never has.  It is also
  5587.           not a modified version of any other mail user agent.
  5588.           Similarities with any other mailer may have been designed
  5589.           for compatibility reasons.
  5590.  
  5591.           UNIX is a trademark of AT&T.
  5592.  
  5593.           The Flintstones and The Jetsons are trademarks of Hannah-
  5594.           Barbara Inc.
  5595.  
  5596.      BUGS
  5597.           The curses interface uses the curses library.  The routines
  5598.           from the library that are used are the most basic and simple
  5599.           so as to avoid possible bugginess that different versions of
  5600.           UNIX might have.  However, one unavoidable problem is the
  5601.           reverse video mode.  Depending on your terminal, the termcap
  5602.           entry for it, and the version of curses you are running, the
  5603.           reverse video may make things worse than desired.  In such
  5604.  
  5605.  
  5606.  
  5607.      Page 85                                        (printed 12/21/90)
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5615.  
  5616.  
  5617.  
  5618.           situations, the user should set the variable no_reverse to
  5619.           not get reverse video.  `^R' may still be entered at runtime
  5620.           in the curses interface to toggle reverse video.
  5621.  
  5622.           Toggling from the curses mode to the line mode to get the
  5623.           full functionality of the shell/line mode is unfortunately
  5624.           necessary in order to maintain the display in a sensible
  5625.           manner and to keep the keystroke-command interface simple
  5626.           and "user friendly".  Mostly, such escapes are only
  5627.           necessary for piping of commands and using the pick command.
  5628.           Macros are a big help with this.
  5629.  
  5630.           If the program is already running and the system [later] has
  5631.           to swap and there is no swap space left, there may be
  5632.           problems.  One such problem is sending mail.  If this
  5633.           happens, then sending mail will fail and a segmentation
  5634.           fault from the spawned/forked child may occur (unless the -v
  5635.           flag was given to mail).  The unsent letter will not be
  5636.           removed from the editing file ($home/.edXXXXXX) and may be
  5637.           recovered.
  5638.  
  5639.           Many functions available to the line oriented mode (shell
  5640.           mode) are not available to the tool mode.  For example, pick
  5641.           may not be directly accessed although experienced users may
  5642.           find that typing pick commands within single backquotes in
  5643.           the "Range:" panel item above the header window and then
  5644.           selecting a command that uses the the range will indeed pick
  5645.           messages.  This is mostly for selecting the "delete range"
  5646.           item or the middle mouse button icon in the header panel.
  5647.  
  5648.           Version 6.5.6 was the last version designed to run under
  5649.           SunWindows, and is therefore the most recent version that
  5650.           will function under SunOS 2.x.  The current version, 7.0,
  5651.           has been ported to SunView, and may have a completely new
  5652.           set of problems in addition to those described below.  Also,
  5653.           some of those described below may have been eliminated, and
  5654.           remain in this discussion only for completeness.
  5655.  
  5656.           Shell escapes (of any kind) may be called only from the
  5657.           "pipe" command in the tool mode, should not be interactive,
  5658.           and should produce output only to a file.  The reason for
  5659.           this is that there is no tty window in which to do
  5660.           input/output.  Since the interactive function-key binding
  5661.           interface has gone away, it is unfortunately only possible
  5662.           to execute commands that have been pre-defined in the
  5663.           initialization file.  Future revisions may correct these
  5664.           deficiencies.
  5665.  
  5666.           The function keys and their ability to work has been
  5667.           variable depending on the version of SunWindows/SunView your
  5668.           Sun Workstation has.  From time to time, it works, but when
  5669.           it doesn't, it seems to be related to other user or system
  5670.  
  5671.  
  5672.  
  5673.      Page 86                                        (printed 12/21/90)
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.      MUSH(C)           Version 7.1.0 (Apr 25, 1990)            MUSH(C)
  5681.  
  5682.  
  5683.  
  5684.           definable dot-files or whatever.  This of course means that
  5685.           the function keys are relatively untested in conjunction
  5686.           with SunView (SunOS later than 3.3).  The default function
  5687.           key bindings have been eliminated to avoid collisions with
  5688.           SunView window system functions.
  5689.  
  5690.           Changing the value of the screen_win, crt_win, or msg_win
  5691.           variables after the tool is running simply has no effect.
  5692.  
  5693.           When using vi in the tool mode, the window is periodically
  5694.           one line "short." That is, scrolling is off by one line and
  5695.           you have to redraw the window (using "z." in vi) to get it
  5696.           in sync again.  This problem remains in most SunView
  5697.           implementations, but does not seem to appear with the
  5698.           current default composition window size.
  5699.  
  5700.           When running on full filesystems, Mush may complain or not
  5701.           even run since it needs temporary space with which to work.
  5702.           Instead of finding new filesystems on its own, Mush leaves
  5703.           this task up to the user.  The workaround is to set the
  5704.           variable tmpdir in the initialization file to be a writable
  5705.           place in a filesystem that has enough disk space.
  5706.  
  5707.           Most of the other known and documented bugs are in the
  5708.           supplied README files accompanying the source.  The source
  5709.           is also an excellent place to look as many known bugs are
  5710.           documented in comments.  A good way to track suspicious bugs
  5711.           is to use the debug command, but note that this command is
  5712.           very difficult to use in curses mode.
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.      Page 87                                        (printed 12/21/90)
  5740.  
  5741.  
  5742.  
  5743.