MUSH

Section: User Commands (1)
Updated: Mar 3, 1987
Index Return to Main Contents
 

NAME

The Mail User's Shell - Shell for electronic mail.  

SYNOPSIS

mush [ -S ] [ -C ] [ -f [ folder ] ] [ -n ] [ -T timeout ] [ -t ] [ -i ] [ -N ] [ -H[:c] ] [ -r ] [ -v ] [ -s subject ] [ -c cc-list ] [ -1 cmd_help ] [ -2 tool_help ] [ -d ] [ user list ... ]  

INTRODUCTION

The Mail User's Shell (Mush) is an interface for sending and manipulating a database of electronic mail messages under the UNIX environment. There are three user interfaces which allow the user to interact with Mush. The window interface for the Sun Workstation utilizes the icon and menu based (mouse selectable) windowing system. This tool (graphics), mode is highly subject to the version of operating system your Sun may be running. While the program works with variable levels of success on earlier versions, it is intended to be run on Sun versions 2.0 and higher. See the BUGS section at the end for more information.

The text-graphics interface is reminiscent of the vi visual editor. This interface does not require graphics capabilities of the computer or the terminal on which it is run, but the terminal must have the minimum capabilities required by any visual screen editor.

The default interface is the conventional tty-based line mode similar to command line interpreters such as csh as well as other mailers, such as University of California, Berkeley's, Mail and Bell Lab's System V mailx interface. This mode requires nothing from the terminal in cursor optimization and may be run on many different version of UNIX running on various architectures such as VAX and MicroVax (4.2, 4.3 BSD), IBM-PC AT's running system V (XENIX), IBM-RT's, and pyramids.

See the correpsonding subheadings for more information on the user interface desired. Most of this manual deals with commands, variables and actions which are usually common to all three interfaces although some attention is paid to individual characteristics of each interface.

The following command line arguments are understood by Mush:

-S
This flag allows the user to enter the shell even if the system mailbox, or specified folder is empty or doesn't exist.
-C
Enter the mailer in curses mode upon startup.
-f [ filename ]
The optional filename argument specifies a folder containing mail messages. With no argument, mbox in the current directory (or the variable `mbox') is used.
-n
No initialization is done on start up. That is, do not source .mushrc or .mailrc files. See the subheading INITIALIZATION for more inforation on start and these files.
-T timeout
(Sun only) In the tool mode, timeout specifies the length of time (seconds) to wait between each check for new mail. 30 seconds is the smallest time allowed for performance reasons. 60 seconds is the default value.
-t
Use the graphics tool mode (Sun only).
-i
Forces interactive mode even if input has been redirected to the program. This is intended for remote host mail sessions but also allows the user to redirect "scripts" of Mush commands. See the INITIALIZATION subheading for information on how to write scripts which deal with mail.
-N
Enter Mush without displaying any message headers. This argument is passed to the folder command.
-H[:c]
Have Mush just display mail headers without entering the shell. See the headers command for information on the :c argument. No colon modifier is equivalent to -H:a.  This option prevents the shell from running, so this option will turn off the flags, -S and -C. This option is ignored if the tool mode is in effect.
-r
Initialize the folder in Read-Only mode; no modification of the folder is permitted. This argument is passed on to the folder command.
-v
Verbose mode is turned on. This option is passed to the actual mail delivery subsystem internal to your version of UNIX. Some mailers do not have a verbose option, so this flag may not apply to your system (System V, for example). This applies when sending mail only. If you are entering the shell, curses mode, or the tool mode, this option is ignored.
-s subject
The subject is set on the command line using this flag. If the subject has any spaces or tabs, the entire subject should be encased in quotes. This applies when sending mail only. If you are entering the shell, curses mode, or the tool mode, this option is ignored.
-c cc-list
he list of Carbon Copy recipients is set on the command line. If more than one address is specified, the entire list should be encased in quotes. This applies when sending mail only. If you are entering the shell, curses mode, or the tool mode, this option is ignored.
-1 cmd_help
-2 tool_help
Specify alternate locations of help files. These should be full pathnames accessible for reading. This is usually done if a binary copy of Mush has been copied from another machine and the wrong pathnames to the help files cannot be changed.
-d
Turns on the debugging level to 1. You can change debugging levels from within the shell using the debug command.
 

FEATURES

The following features are common to all user interfaces that Mush provides. Interface-specific features are listed separately under the subheading for that interface. Commands and user definable variables are described under the appropriate subheadings.

New Mail.

If during a Mush session, new mail arrives for you, it is automatically incorporated into your system mailbox and you are told that new mail has arrived.

In the default line mode, new mail is checked between each command issued. In the tool based graphics mode, new mail is checked approximately every minute or by the number of seconds specified by the -T option on the command line. In the curses mode, new mail is checked on each command and is displayed in the bottom line of the screen.

If you are using your system mailbox as your "current folder," then the new mail is added immediately to your current list of messages and this information is displayed telling you whom the mail is from:


      New mail: (#15) island!argv@Sun.Com

If you are not in your system mailbox, then the new mail will not be added to your list of messages, but you will instead be informed of the new arrival.

If you are using the tool based mode and Mush is closed to an iconic state, then the number of messages in the current folder is displayed on the mailbox icon and the flag on the mailbox will go up.

Aliases.

Mail aliases are shorthand names for long mail addresses. These are supported in the same manner as UCB Mail supports them. Because Mush has command line history reminiscent of csh, commands which use uucp's `!' character for user-host and host-host separation should be escaped (preceded by a backslash). This is not necessary in the initialization file (.mushrc) because history referencing is ignored while these files are being sourced. See the subheading, INITIALIZATION and the line-mode interface for more information on initialization file format and the history mechanism.

Aliases reference normal mailing addresses as well as other aliases. If a loop is detected, then the user will be notified and a dead.letter will be forced into the file dead.letter in the user's home directory. The command, unalias, is used to reverse the effects of the alias command.

Help.

Mush was designed so that each command or action should not be a mystery. Helping the user understand what to do and how to do whatever he wishes is the goal behind the help facility. For this reason, the command, help gives information on both general usage and specific help categories.

In text mode, most help is gotten by typing `-?' as an argument to a command. Virtually all commands have the -? option. When this option is specified, most commands will attempt to read from a help file the necessary information explaining the functionality of the command in executed. If necessary, a pointer to other sources of information will be given to fully explain a concept.

In the tool/graphics mode, this is also possible, but more extensive help is provided in the pop-up menus. Pop-up menus can be gotten from virtually anywhere on the screen; press the RIGHT mouse button (the "menu button") and a number of items will appear in a menu. The last command in the menu list will be one labelled "help." Selecting this menu item will display a "help box" in the center of the console and wait for input to remove the box.

In the curses mode, the `?' key will display a list of the current command-to-key bindings; a keystroke or set of keystrokes correspond directly to a command.

Sorting mail.

Mush allows you to sort your mail according to various constraints such as time, status (new, unread, deleted, etc), by author and subject. See the sort command in the subheading COMMANDS for more information on sorting.

Picking specific messages.

You can select messages that contain unique information, or from messages that have special attributes. You have the option of restricting your search to messages between dates, message numbers, author names and other constraints.

 

INITIALIZATION

Upon startup, before any command line arguments are parsed, and before the current folder's messages are read (thus, there are no messages to speak of, yet), Mush will initialize itself with basic variable settings and values. If the -n option is given, initialization is not done. If no -n option is given, it will source an initializing file which contains commands that [typically] set variable values, aliases, command line aliases, and so forth. The file it reads from is determined by first looking for the environment variable, MAILRC. If that file isn't found, then the file .mushrc is search from the home directory of the user. If that file cannot be found, it will attempt to read the file, .mailrc from the same directory. If that file isn't found, then the default initialization file setup by the administrator is attempted. Finally, if that file cannot be read, then nothing is done about initialization and the default values will be in effect.

If the user has no home directory, or permissions prevent read/write access to $HOME, /tmp is used as the home directory. See the home variable under the VARIABLES heading.

You may specify a filename to source if you want to source a specific file other than the default. You may use the command saveopts to save all variable settings, aliases, and all other Mush settable attributes. If no filename is given on the command line, saveopts chooses a file in the same manner that source does. Using saveopts is highly discouraged since it overwrites files without warning and saves settable variables only. ``if'' expressions are not saved and session-dependent settings may be invalid upon next invocation.

Initialization File Format.  When reading the initialization file, Mush will recognize the `#' character as a comment character. It may be anywhere on a line in the file. When that character is encountered, processing of that line is discontinued to the end of the line. If the `#' is encased in quotes (single or double), then it is not considered a comment.


   set shell = /bin/csh # set the shell variable
   # this entire line has been commented out. set prompt = "Message #%m: " # The `#' is within quotes

The exit command has special meaning in the initialization file. If the command is found, Mush will not exit, but rather, discontinue reading from the file immediately.

There may be ``if'' expressions within the initialization file to determine certain runtime states of Mush. There are no parentheses allowed and only one boolean expression may be evaluated per line; that is, no ``&&'' or ``||'' may be used in expressions. There is currently no support for multiple levels of if-else expressions and embedded ``if'' expressions are ignored (they are evaluated to TRUE). There must always be an ``endif'' accompanying all ``if'' expressions. The statements associated with an ``if'' expression are never on the same line with the conditional.

Understood conditional expressions include the internal variables, istool, iscurses, hdrs_only, and redirect. If istool is true, the program is going to start in the tool mode. If iscurses is true, the program is in or is going to start in the curses mode even though the screen package may not have already been started. If hdrs_only is true, then the -H flag on the command line has been given. If redirect is true, then input to the program is redirected. The -i option on the command line is required to run the shell if redirect is on. If the flag is specified, the value for redirect will be set to false. These are internal variables whose values can not be referenced using the ``$variable'' method of variable expansion.

The `!' operator may be used to negate expressions, thus,

if !istool
    exit
else
    set autoprint
endif

means that if you are not running as a tool, stop reading commands from this file. Otherwise, set the autoprint variable. The test for redirection may be done to determine whether or not input, not output, has been redirected to the program.

set hdr_format = "%S %25f %7d (%l/%c) %25s"
if (hdrs_only)
    exit
endif

This tells the program to set the hdr_format variable and check to see if we're running the program to read headers only. If so, stop reading this file (exit) and continue on with the program. This speeds up runtime quite a bit for those who have lengthy initialization files because no other shell variables are necessary.

if !iscurses
    set crt = 24 screen = 18
endif

This segment checks to see if we're not running in curses mode and if not it will set our crt and screen sizes. This is mostly because the curses mode will set those values for us by looking at the size of our screen for us. The curses command itself should never be called from an initialization file. Doing so will cause terminal settings to be set incorrectly and unpredictable results from there. In fact, no interactive commands should be called from any initialization file. These commands are not prevented because it is impossible to trace which commands are aliased to interactive commands and which might even be shell commands that are interactive. The responsibility of not running interactive commands is left to the user. See the section on curses under THE CURSES INTERFACE for configuring your environment so you enter the curses interface each time you runs the shell.

When initialization files are being read, no history expansion is done, so the `!' need not be escaped for address aliasing. String evaluation is allowed and the operators, "==" and "!=" may be used to determine their equality. Usually, variables are compared with constants for evaluation.

if $TERM == adm3a
    set pager = /usr/ucb/more
else
    set pager = /usr/local/less
endif

This segment tests to see if the user's terminal type is "adm3a". If it is, then it sets the pager variable to be the "more" program. Note that the variable TERM will be gotten from the user's environment if a shell variable is not set already. Otherwise, the pager variable is set to "less". This example exemplifies the fact that "less" normally fails to function correctly for the terminal type ``adm3a'' so we don't use it.

After sourcing the initialization file, Mush reads all the mail out of the specified folder (the system spool directory if no folder is given) and creates a list of messages. The current maximum number of messages the user can load is set to 1000 by default. The system administrator who configures the program can reset this value higher or lower if you ask nicely. If the user has the sort variable set, then when the current folder's messages are finally read, the messages are sorted according to the value of the variable (see the sort entry under the VARIABLES heading for more information). Each message has a number of message headers which contain information about whom the mail is from, the subject of the message, the date it was received, and other information about the letter. This information is then compiled into a one line summary and is printed out sequentially in the appropriate manner depending on the interface you're using.

At this point, commands may be input by the user. The initialization file is read before any messages are read into the program. Message filtering commands should not be placed in this file unless you know you're going to resource the file later as a command. For example, a filtering file, "filter", might contain:

pick -f Mailer-Daemon | save mail_errors
pick -f yukko | delete
pick -s -i thesis | save +thesis_mail
pick -t unix-wizards | +wizmail
update
sort d

The first command the user could type might be source filter and the following would happen. First, all messages that have Mailer-Daemon in the from line will be saved in the file "mail_errors". Then, all mail from the user "yukko" will simply be deleted. Next, all mail that has in the subject field "thesis" (case ignored, so "Thesis" would also match) would be saved in the file $folder/thesis. The next command would find all messages that were addressed to the group "unix-wizards" (of which the user is an elite member of) and save them in the file $folder/wizmail. The folder will be updated, removing all deleted mail (saved mail may be marked as deleted), and the folder is reread and sorted according to the date of the messages.

 

THE TTY INTERFACE

In the line-mode, the user is given a prompt to which commands are issued and arguments are passed to commands. When the user types at the prompt, each line is parsed and words (or, arguments) are separated into an array of strings. This array, also called an argument vector, is then modified by expanding history references, command line aliases, or expanding variable references. A command line ends when the end of the line is encountered or a pipe (|) or semicolon (;) character are encountered, separating discrete commands.

When a command line has been determined and placed in an argument vector, the first argument in the vector (the `command') is searched for in a list of legal Mush commands. If found, the function associated with that command is called and the rest of the line is passed to that function as command line arguments.

Before commands are called, however, the input the user gives is preprocessed in a style reminiscent of csh. Mush also supports a subset from each of the following aspects of csh. * Command history.
* Command line aliasing.
* A `piping' mechanism to redirect "input" and "output" of commands.

Command history.

The history mechanism remembers commands up to the value of the history variable. To reference previously typed commands, the `!' character is used in the same manner as csh.

Examples:

!-2:$   two commands ago, last argument.
!3:2-4  the third command, arguments two through four.
!!      the last command in its entirety.

There is a limited implementation of history modification. Supported is the argument selector which references command line arguments and 'p' (echo, but don't execute the command).

During the sourcing of initialization files (.mushrc), history is not in effect and therefore the ``!'' character does not cause history expansion. This includes startup of the program and when the command source is issued. Uucp style addresses that contain the ``!'' character may be given without the need to be preceded by a backslash in the initialization file. However, ``!'' does need to be escaped if cmd's are used to reference command line arguments.

Command line aliasing.

This feature enables command substitution similar to csh. To be backwards compatible with UCB's Mail, the alias command is used for address aliasing. Thus, the command cmd is introduced in place of alias.

Examples:

cmd d delete
cmd t type
cmd dt 'd ; t'
cmd - previous
cmd r 'replysender \!* -e -i'

In the last example, if the user types `r 5', Mush will reply to sender of the fifth message and pass all the other arguments along to the reply command. Note the escaping of the ! character. This must also be done if set in the initialization file (.mushrc). Had the user not specified a message number on the command line (`r'), respond would reply to the "current message" rather than the fifth message.

Piping commands.

"Output" from a command is a message list, not the text in a message. A message list is defined as the set of messages which the user specifies in a command or the messages a command affects after it is through executing. When one command is piped to another, the effect is that the second command will "consider only those messages the affected by first command." In most cases, Mush is smart enough to know when piping is occurring and may suppress text output that a command might produce.

Examples:


   pick -f fred | save fred_mail

This will find all the messages from "fred" and save them all in the file named "fred_mail".


   lpr 4-8 | delete

This will send messages 4, 5, 6, 7, and 8 to the printer and then delete them.


   headers :o | delete

Delete's all old (already read) mail.

Because action is taken on mail messages, not files, metacharacters such as `*' and `?' are not expanded to file names as csh would do. Instead, Mush commands take as arguments, message lists (a list references one or messages) to take action upon. To reference message numbers, there is a special syntax that Mush will understand.

*                   All messages.
^                   The first message.
$                   The last message.
N-M                 A range of messages between N and M.

In the last case, N and M may be * ^ $ . or digits referencing explicit message numbers. The range must be in ascending order.

You can also negate messages by placing the message list inside braces, `{' `}' -- thus, the expression "2-19 {11-14}" references messages 2 through 19 except for those between 11 through 14.

Note that message lists are parsed left to right. Indicating negated messages may be reset by turning them on again later in the argument list. A common error new users have is to specify a negated list without specifying any beginning messages.
   delete { 6 }

In this example, the user attempted to delete all messages except for number 6. He should have specified the * before hand.


   preserve ^-. { 3 } Here, the user specifies a valid message list and causes mush to preserve all messages from the beginning of the list (message 1) to the current message excluding message 3.

As discussed, the command line is parsed and the command given is called and the rest of the arguments on the command line are passed to it. If no command has been found for the one given, then the variable unix is checked. If set, the command line given is attempted to be run as a regular UNIX command.

If it is not set, or if the command cannot be found in the user's PATH environment, a message will be printed indicating that the command was not found.

Since no `messages' are affected by UNIX commands, piping is disallowed either to or from such commands. If the user wishes to execute UNIX commands which are to be piped to one another (or use any sort of redirection), the command, sh is provided for such purposes. Since Mush will parse the entire command line, caution should be taken by enclosing quotes around questionable shell variables or metacharacters. See the COMMANDS heading below for more detail.

This shell-like quality is for the convenience of the user and is not intended to replace the functionality of sh, csh, or any other command interpreter.

 

THE CURSES INTERFACE

The curses interface utilizes the curses routines intrinsic to most UNIX systems these days. This interface is screen oriented rather than line oriented and allows the user to access commands and messages more quickly at the cost of history, piping, and a few commands.

Many users who prefer the curses interface might want to always start all their mail sessions in the curses interface. Putting the curses command in your initialization file is a no-no, so you can alias your login shell mail command to include the -C option. If you use the Bourne Shell, you're going to have to type it out all the time. Mush is going to attempt to know not to run a shell if you're just sending mail to someone, so the command line sequences:

% alias mail 'mush -C'
% mail fred

will mail to fred and not enter the shell. However, if you just said, "mail" with no arguments, you'll enter the shell in curses mode if you have mail. If you don't, you'll be told so. If you want to enter curses mode even if you don't have mail, use the -S option on the command line.

In curses mode, the user's terminal has it's "echo" turned off so commands that are issued are not echoed on the screen. Certain commands cause the mode to return to normal for typing purposes (sending mail, for example). In normal operation, the screen will display the current set of message headers, the current message number is in the top left corner, the mail status on the top line, and the cursor will be placed on the current message. The number of message headers displayed is set by the variable, screen. If the user does not have that variable set, the baud rate is checked and the size of the screen is set according to optimal refresh time. Usually, 300 baud gives 7 lines, 1200 gives 14, 2400 gives 22 lines, and all higher baud rates give the size of the screen, whatever that may be. Note that the top line is reserved for "status" and the bottom line is for user interaction should it be required.

The user may now type commands via key sequences which are not echoed to the screen. Thus, function keys may be bound to "commands" by using the bind command. A list of key-to-command bindings can be found at runtime by typing `?' in curses mode or by using the bind command.

The commands which you can map sequences to are intended to be as self explanatory as possible, but admittedly, it's easier to figure out via trial and error than to try to wade through this documentation. A list of the legal curses commands can be obtained when executing the bind command. Regular tty line-mode commands are not issued from the curses interface; only special curses mode commands are understood. The current list of valid curses commands is:

goto msg       write          write list     save
save list      copy           copy list      delete
delete list    undelete       undelete list  reverse video
redraw         next msg       back msg       first msg
last msg       top page       bottom page    screen next
screen back    show hdr       source         saveopts
search up      search down    search cont    preserve
sort           sort reverse   quit!          quit
exit!          exit           update         folder
shell escape   line mode      lpr            chdir
variable       ignore         alias          my hdrs
version        mail flags     mail           reply
reply all      display        top            display next
bind           unbind         help 

The following is a list of default key-command bindings. If you specify bind commands in your initialization file that conflict with these defaults, your settings will override the defaults. The default settings given here use the ^-character method to indicate control characters. Thus, `^X' would mean control-X even though you'd have to type "\CX" to set the binding and actually use the control key and the `X' key simultaneously to really do a Control-X. This is mostly because nroff makes printing the backslash character so amazingly difficult.

t, p, T=top, n=next
Display (type/print) message. Top will display the first crt lines of a message. `n' will print the next message. If the current message is deleted, the next undeleted message is found. You might notice this is different than the line mode which will return an error message that the current message is marked as deleted.
+, j, RETURN
Go to next message.
-, k, ^K
Go to previous message.
z, Z
Print next/previous screenful of messages.
H
Header information for the current is printed. This only works when the user is provided with the "...continue..." prompt and he wishes to view the current message header instead of redrawing the entire screen.
f
change folder. If current folder has changed, verification for update will be prompted.
^U
update folder.
v
set regular variables.
a
set aliases
h
set personal headers
i
set ignored headers
|
send message to printer
m, M
send mail (prompt for mail flags).
d, D, u U
delete/undelete messages (prompt for message list).
^P
Preserve current message (toggle).
r, R
reply sender/reply all.
s, S, c, C, w, W
save, copy, or write messages (capitals prompt for message lists).
!
Shell Escape --prompts for command: RETURN invokes a shell.
o, O
Order messages (sort). O reverses order. The order in which to sort messages is prompted.
(, )
source/saveopts --filename is prompted.
/, ^/ ^N
forward, backward, continue search for patterns. Entire messages are not searched for here. Only the text available on the screen is searched for.
V
Print version number.
{, }
Top/bottom of screen.
^, $
Go to first/last message.
%
change directory.
g, 0-9
Go directly to message number.
:[cmd]
Enter line mode for one command (RETURN exits curses-mode).
Q, q, X, x
Quit. `x' does not update mail. `Q' does not prompt for update verification. `Q' and `X' may be typed at the "...continue..." prompt whereas `q' and `x' may not.
^R
Toggle reverse video mode (current message is in reverse video).
^L
redraw the screen.

When setting new key sequences to be bound to commands, the user may use control keys and the ESCAPE character for extended commands. Exceptions are control-C, control-\, and possibly other control characters depending on your system's configuration or your current tty interrupt character settings. The spacebar may not be bound since it is the only obvious way to return to the top level curses mode from the "...continue..." prompt.

When assigning key sequences to commands, the user enters the bind command and prompting is done. If the user wishes to have control characters or the escape character in a key sequence, he must use special notation since control characters are not echoed visibly on the screen. This same sequence is used if the user wants to bind sequences in the initialization file.

To bind control characters, the sequence, "\Cc" is used where ``c'' is the character which the control key will translate to and must be in upper case. The sequence, "\CP" would map to control-P. If the user wishes to indicate the RETURN key, this is specified with the string, "\n" and the tab key is specified by the string "\t". On a Wyse-50 terminal, the 8th function key outputs the three characters: Control-A, H, line-feed. To map this function key to a command, the user would have to enter the sequence, "\CAH\n" as the key sequence, then follow up with a valid curses command. From then on, if the user uses that function key, then the command mapped to it will be executed.

The ESCAPE key is signified by the sequence, "\E". On a Sun-3 workstation, the R1 key outputs the character sequence: ESC, [, 2, 0, 8, z. The corresponding key sequence would be "\E[208z". Restrictions are that key sequences may not contain the space key or begin with a digit. Unfortunately, this makes mapping the spacebar to a command impossible.

Whenever a command is entered, if the command causes the screen to scroll or be refreshed in anyway, the mode is left in the continue mode. When in this mode, the user is given his line-mode prompt followed by "...continue..." indicating that he may issue a new command or return to the top level where the current message headers are displayed on the screen. Remember that this is still the curses mode, but much time is saved by avoiding to redraw the screen after each command. The user may move up and down messages using the appropriate commands (j/k by default) or anything else the curses mode allows. Unknown commands do not return to the top level, only the spacebar, and the exit and quit commands will return to the top level. Because the exit and quit commands are used to do this, there are 2 additional ways to "quit" in the program and return to the login shell. The two commands, "exit" and "quit" commands will quit from the top level, but the commands, exit! and quit! are used to exit from the "continue" level in the curses interface as well as from the top level.

Note that the best way to understand the curses interface is to just use it. In line mode, the command "curses" puts you into curses mode.

 

THE GRAPHICS INTERFACE

When running the window-based graphics interface, there will be 5 windows displaying panels of commands, message headers and a text window which is used for displaying messages or writing messages to send to other users.

The panel items have labels describing their functionality. Selecting a panel item with the LEFT mouse button causes the action to be executed. The RIGHT mouse button displays a menu of options that the command may branch to. For example, the save panel item by default will save messages to the file "mbox", but if the RIGHT mouse button causes a menu to be displayed the choices of where to save the message increases to include the items in the menu. These typically include the files in the user's folder directory (see the folder variable below).

At the end of each list of menu entries for panel items is an item labelled "help." When this item is chosen, help with that command is displayed in the center of the console.

When composing letters, the interface is the same for the tool mode, the line mode and the curses mode. Tilde escapes are recognized by all the interfaces, but the tool interface allows the user to use the menu mouse button to select the tilde escape desired.

If the user wishes to review a mail message while in edit-mode, he may do as the other interfaces and enter the tilde escape command, ``~:print''. This will cause the current message (or message number if given) to be displayed in the window. Editing is temporarily put on hold till the user enters a `q' in the message window to indicate that he is done reading the message and input is to be directed again to the letter being composed.

 

GENERAL USAGE

Because there are three different interfaces available to the user, the tty characteristics (backspace, kill-word, kill-line, redraw line) are simulated identically to all routines. When the user has to type something, the 4.2BSD style of tty driver interface is simulated whether you're in the window system, the curses mode, the tty-line mode, and even on System-V machines. This means that backspacing causes a backspace-space-backspace effect (erasing the character backspaced over). The user may reset his tty characteristics using the stty command.

Displaying messages. 

Depending on the interface you use, you can display any message in your list of messages as long as the message is not marked for deletion. If the message is marked as deleted, then use the undelete command supplied by the interface you are using. To display a message in line mode, specify a message to be displayed using print, type, p, t, or by typing the message number, that message will be printed on the screen.

In the graphics mode, you move the mouse over the message you wish to be displayed and select the LEFT mouse button. If the message you want is not visible (in the header subwindow), you may type in the message subwindow the number of the message and hit return. That message number will be displayed.

In curses mode, you can move the cursor over the message you want and type a `t' or `p' to read the message. The user may "bind" other keys to call the function which displays messages if `t' or `p' are uncomfortable.

In the line or curses mode, if the message has more lines than the variable crt, then a pager will be invoked to allow the user to page through the message without having it race by the screen. The pager used is determined by the variable, pager. If that variable is unset, the a default pager will be used. Note that if pager is set, but not to a value, then nothing will be printed.

In the tool mode, if a message is larger than the size of the message subwindow, the amount of the message viewed is displayed and the user may page through the message via `+' (forward by lines), `-' (backwards by lines), LEFT mouse button (forward by pages), or RIGHT mouse button (backwards by pages). The user may precede the `+' and the `-' keystrokes with a numerical count to specify how many lines to scroll.

An alternative to displaying messages is the top command. This command will print just the top few lines of a message. The number of lines is determined by the variable, toplines. If this variable isn't set, ``top'' will print the value of the variable, crt, number of lines.

Sending mail.  You can send mail using the mail command or by responding to other mail. In either case, when you are sending mail, you are in a mode where everything you type is added to the contents of the message. When you are done typing your message, you can type ^D to signify the end of the message. If you have the variable, dot set, then you can end a message with a "." on a line by itself.

While you are composing a message, Mush treats lines beginning with the character `~' specially. This is called a tilde escape. For instance, typing ``~i'' (alone on a line) will place a copy of the "current message" into your message body. It will not include the message headers of the message, just the body of text. Each line of the message will be preceded by "> " to indicate that it is an included message. You can set the variable string indent_str to a string if you want to precede those lines with something other than "> ".

Available tilde escapes: [OPTIONAL arguments in square brackets]

~e [editor]
Enter the editor. `set editor', env EDITOR, vi.
~v [editor]
Enter the visual editor. `set visual', env VISUAL, vi.
~p [pager]
Page the message body. `set pager', env PAGER, more.
~i [msg#'s]
Include current msg body [msg#'s] indented by indent_str.
~H [msg#'s]
Same, but include the message headers from included messages.
~f [msg#'s]
Forward mail. Not indented, but marked as "forwarded mail".
~t [list]
Change list of recipients. If a list is given, this list is appended to the current list. If no list is given, then the current list is displayed and the cursor placed at the end of the list. You can backspace over the stuff in the list or you can append more addresses onto the end of the list as desired. System-v users may only replace the line, retyping it if necessary, to append new users; specifying a list on the tilde line is recommended in this case.
~s [subject]
Modify the subject header. If an argument is given (a new subject), then the subject line is replaced by the new subject line. If none is given, then the subject line is displayed for editing just as the ~t command.
~c [cc list]
Modify carbon copy recipients identical to ~t.
~b [bcc list]
Modify blind carbon recipients identical to ~t.
~h
Modify all message headers. Each header is displayed one by one and each may be edited.
~S[!]
Include Signature file [don't include] at end of message. The variable, autosign describes the file or string to append to the message. See the VARIABLES section for more information on this variable.
~F[!]
Add a fortune at end of letter [don't add] at end of message.
~w file
Write message buffer to file name.
~a file
Append message buffer to file name.
~r file
Read filename into message buffer.
~q
Quit message; save in dead.letter if "nosave" is not set.
~x
Exit message; don't save in dead.letter.
~$variable
Insert the string value for variable into message. If a boolean variable is listed, nothing is appended regardless of its value.
~:cmd
Run the


 

Index

NAME
SYNOPSIS
INTRODUCTION
FEATURES
INITIALIZATION
THE TTY INTERFACE
THE CURSES INTERFACE
THE GRAPHICS INTERFACE
GENERAL USAGE

This document was created by man2html, using the manual pages.
Time: 06:14:56 GMT, December 12, 2024