home *** CD-ROM | disk | FTP | other *** search
- /* @(#)cmd_help 1.4 10/24/88 (Dan heller) */
-
- %?%
- The `?' command will give you a list of legal commands. Most
- commands accept -? as an option. This will give you specialized
- help with that particular command.
- %%
-
- %ignore%
- ignore/unignore [headers]
-
- Use this command to set the message headers you would like not
- to be printed when you read a message. If no header specified,
- then a list of all headers currently being ignored is printed.
- You must specify a header for unignore.
-
- You can set the variable "alwaysignore" to force normally
- ignored headers to be ignored while saving messages, forwarding
- messages or including messages into message buffers.
- %%
-
- %set%
- set/unset [variable [= value]]
-
- With no parameters, set lists all variables and their values.
- To set a boolean variable (on or off), use:
- set variable
- To set a variable's value to a string, use:
- set variable = value
-
- If you want double-quotes or white-space embedded in a string,
- encase the string in single quotes. If you want single quotes
- in a string, encase the string in double quotes.
-
- For a list of all variables with special meanings, use:
- set ?all
- For help on a particular one of these variables, use:
- set ?variable_name
- %%
-
- %readmsg%
- You can read messages in different ways. "type" and "print"
- will print the current message. "top" will only print the first
- N lines of the current message where N is the value of the
- variable "crt". "next" will go to the next unread message and
- print that. "previous" will go back and read the first unread
- message previous to the current. "^" will print the first
- message, "$" will print the last.
-
- Any of these commands can be followed by a message list, and
- each message in that list will be printed (or piped to other
- commands).
- %%
-
- %alts%
- alts [hostnames]
-
- The alts command sets a list of hostnames on which you have an
- account. Normally, when you respond to all recipients of mail,
- your account name will be listed as if you wished to send
- yourself mail. If you don't have metoo set, then your name will
- be removed from the mailing list if your login name is on the
- list and the host specified is in the alternates list. The
- special parameter `*' instructs alts to match all hostnames; in
- that case, only the login name is tested.
- %%
-
- %source%
- source/saveopts [file]
-
- The source/saveopts commands will load/save all variable
- settings, options, aliases, cmd's, ignored headers ...
- everything you can set, it loads or saves. The file read or
- written follows these rules:
-
- 1) If a filename is given, that file is used
- 2) The file described by the environment variable MAILRC
- 3) In the user's home directory: .mushrc (if it exists)
- 4) In the user's home directory: .mailrc (if it exists)
-
- If saveopts is used and the file exists, confirmation will be
- requested before the file is overwritten.
- %%
-
- %general%
- This is the general help message. To get help on a specific
- command, try "command -?". Extended help is given by typing
- "help item" where item is one of:
- path, msg_list, prompt, hdr_format
- Help with msg_list is highly advisable!
-
- Type "?" to get a list of available commands. Try "? command"
- to get help on the particular command that you specify.
- %%
-
- %path%
- Whenever "path" is specified, the following syntax is legal
- besides the normal path addressing scheme used by unix:
- ~[user] -- the home directory of specified user (yours by default)
- %[user] --/usr/spool/mail/login_name [user_name] (yours by default)
- +file --the directory described by `set folder'; file is `file'
- %%
-
- %msg_list%
- A "msg_list" references one or more messages. The user
- specifies a group of messages according to a special syntax.
-
- * All messages.
- ^ The first message.
- $ The last message.
- . The current message.
- N-M A range of messages between N and M, inclusive.
-
- 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 from 11
- through 14.
-
- Commands can be "piped" to one another, because the return value
- of a command is a msg_list, not text. For example,
- pick -f fred | lpr
- will find all messages "from fred" and send them to the printer.
-
- Commands dealing with more than one message process them in
- numeric order -- not necessarily the order specified. Thus, the
- command "save 1-5 9 7 6 file" will save the messages in
- ascending order, not in the order given.
- %%
-
- %preserve%
- preserve [msg_list]
-
- The "preserve" command saves deleted or read messages in your
- mailbox. Without explicitely setting preserve, all mail that
- you read will be saved in ~/mbox (or set mbox). Setting the
- boolean variable "hold" is equivalent to preserving each message
- as you read it.
- %%
-
- %save%
- save/write/copy [-s|-S|-a|-A] [!] [msg_list] [filename]
-
- If no filename is specified, ~/mbox (or the value of the
- variable "mbox") is used. Save and write will append msg if
- `file' already exists. Specifying the `!' will overwrite the
- file (e.g., erasing it first).
-
- To save messages to a filename beginning with a digit, escape
- the filename with a backslash (\).
-
- The "write" command will write message without the headers (msg
- body only). Save and write both mark messages for deletion
- unless "keepsave" is set. The "copy" command is identical to
- "save" except that messages are not marked for deletion
- (identical to having the variable "keepsave" set).
-
- The -s and -S options save messages to files named by the
- subject of the message. If more than one message is specified,
- then the message subject of each message is used. If -S is
- specified, then the subject of the first message is used for all
- messages. Spaces and forward slashes (/) are converted to
- underscores (_).
-
- The -a and -A options save messages by author's login name.
- %%
-
- %lpr%
- lpr [-n] [-h] [msg_list]
- -n print body of message only (not headers)
- -h print all headers with message body (default true)
- -Pxx print on printer xx
- %%
-
- %respond%
- replysender/replyall [msg_list] [-r path] [mail_flags] [users]
-
- The "replysender" command replies only to the sender of a
- message, whereas "replyall" responds to everyone on the To: and
- Cc: lines of the message.
-
- The commands "reply" is identical to "replysender".
-
- If a message list is indicated, then each message on the list is
- replied to in the same manner. If -r is specified with a host or
- path (uucp-style), then each address in the list is routed via
- this path. This overrides the value of auto_route (see man page).
-
- The address of the author is obtained from certain headers in
- his message to you. Unless you specify otherwise, mush will
- search for the headers Reply-To: Return-Path: and From:. You
- can override these values by setting the variable reply_to_hdr.
-
- set reply_to_hdr = "sender reply-to return-path from_"
-
- This example shows that mush will search for (in order), the
- headers listed in the reply_to_hdr variable. If one header isn't
- found, then mush looks for the next in the list. If none of the
- headers in the list are found, the default headers (mentioned
- above) are searched. The last header listed in the example is
- the special "From " header. See the man page for more details.
-
- Type "mail -?" for information on legal mail flags.
- %%
-
- %sort%
- sort [-] [a|d|R|s|S]
- a by author (alphabetical)
- d according to date
- R by subject including Re: (alphabetical)
- s by subject ignoring Re: (alphabetical)
- S by status
-
- The optional `-' flag will reverse the order of sorting. By
- default (no parameters), sort sorts messages by status: New,
- unread messages are first, followed by preserved messages and
- finally the deleted messages are placed at the end.
-
- If the "date_received" variable is set, sorting by date is
- done using the date you received the message. Otherwise,
- messages are sorted by date sent by the original author.
- %%
-
- %pick%
- pick [-x] [-f|s|t] [-h hdr] [-i] [-r msg_list] [<pat>]
- [-d [-][date]] [-ago [n days] [n weeks] [n months]]
-
- Search for patterns within messages. Entire messages are
- searched for <pattern> unless -f, -h, -s, or -t is specified.
- Only one of -d, -f, -h, -s, -t and -ago can be specified; no
- pattern is used with -d and -ago.
-
- -x return those messages which do NOT match
- -f match pattern in the "From:" field (author) only
- -s match pattern in the "Subject:" header only
- -t match pattern in the "To:" field only
- -h hdr match pattern in specified header field only
- -i ignore case of letters in when matching
- -r msg_list restrict the range of messages search to msg_list
- -d select messages sent on [+ after] [- before] date
- A "date" is of the form: [+-][month]/[date[/year]]
- Omitted fields default to today's values. Examples:
- pick -d 4/20 messages on Apr 20, this year
- pick -d -/2/85 on or before the 2nd, this month, 1985
- pick -d +5/4 on or after May 4, this year
- pick -d / finds today's messages only
- At least one `/' char must be used in a date. There is
- no strong date checking; 2/30 would be considered valid.
- -ago select messages relative to the current date
- Date formats for "ago" are more verbose than for -d; see
- the manual page for details.
- %%
-
- %alias%
- Options for alias:
- alias print all namelists
- alias name print namelist associated with name
- alias name namelist set "name" to the value of namelist
- unalias namelist unalias names in namelist
-
- A "namelist" consists of one or more addresses. An address may
- be a name already set to another list, a valid user, a file or
- a program. Filenames must be full pathnames, i.e., they must
- begin with a '/' (or with a ~, which expands to some home dir).
- A "program" must start with a pipe symbol and be encased in
- quotes:
-
- "|program_name"
-
- The command "expand" will print addresses (including sublists)
- associated with the given alias.
- %%
-
- %from%
- With no parameters, "from" will print the current message's
- header line. If given a message list, "from" will print the
- headers of the listed messages.
-
- The special parameters `-' and `+' can be given to move the
- current message pointer to the previous or next message
- respectively, while also printing that message's header.
-
- If a message list was given in addition to `-' or `+', then
- the current message pointer will be set to the first or last
- message, respectively, in the message list given.
-
- Examples:
-
- from - 10-30 {16}
- will print the headers of messages 10 through 30 except for
- message 16 and set the current message pointer to 10.
-
- pick -f Dan | from +
- will print the headers of all messages that contain "Dan" in the
- author's name and set the current message pointer to the last
- one of that kind in the list.
-
- from +
- will print the header of the message after the current message
- and increment the current message pointer to that message.
- %%
-
- %own_hdrs%
- This command is used to set, unset or view your personalized
- message headers. These headers are included in all your
- outgoing mail.
-
- Options for my_hdr:
- my_hdr show all headers
- my_hdr header show value of header
- my_hdr header: string set header to string
- un_hdr header unset header
- %%
-
- %fkey%
- This command is used to make function key settings in Suntools
- (graphics) mode. When run as a tool (-t on command line),
- choose the Options item, and the "function key" menu option.
- %%
-
- %cmd%
- This function is used to establish command aliases; cmd's are
- just like aliases in the C-shell. Options are:
- cmd view all commands
- cmd command show value of command
- cmd command "value" set command to value
- uncmd command unset command
-
- If you want to reference history commands within a cmd,
- escape the ! with a backslash. For example:
-
- cmd r 'replysender \!* ; delete -t'
-
- will cmd "r" to reply using whatever parameters you have given on
- the command line and then delete that message and print the next
- message (-t parameter to "delete").
- %%
-
- %headers%
- headers [+|-|N] [[-H]:c]
- + print the next screenful (or use the 'z' command).
- - print the previous screenful (or use 'z-' ).
- N print a screenful starting at message number N.
- -H:c where `c' is one of
- a all messages (mostly for the command line parameter -H:c)
- d deleted messages
- n new messages
- o old messages
- p preserved messages
- r replied-to messages
- s saved messages
- u unread messages
-
- The "headers" command prints out a screenful of headers.
- Deleted messages are not normally shown; set "show_deleted" to
- include deleted messages.
-
- The command ":c" is equivalent to "headers -H:c". The -H can be
- omitted, i.e., "headers :c" will also work.
- %%
-
- %hdr_format%
- This variable controls the display of message headers. Use:
- set hdr_format="string"
- to change the header display. The string uses printf style
- formatting and follows these conventions:
- %a address of the author
- %c number of characters (bytes) in the message
- %d entire date of the message (see "date_received" variable)
- %f "From" field (author name and address)
- %i the message-id (may or may not be present)
- %l number of lines in the message
- %M month name of the message
- %N day of the month (number)
- %n name of the author
- %s subject of the message
- %t "To" field (recipients)
- %T time of the message (see "mil_time" variable)
- %W day of the week (Sun, Mon, etc.)
- %Y year of the message
- %y year (last 2 digits only)
- \n a newline
- \t a tab
-
- A field specifier may be used in any % expansion. Thus, "%20s"
- will print the first 20 characters of the Subject. No matter
- what the formatting string, the message number, the status of
- the message and a '>' (if this is the "current" message) is
- before any user defined format is printed.
- %%
-
- %folder%
- folder/update [-N] [-r] [!] [%[user]|#|&|file]
- -N Do not display the list of headers
- -r read only mode (cannot write changes to this folder)
- %[user] change to /usr/spool/mail/[user] (you by default)
- # change to folder accessed previous to current folder
- & change to "mbox" -- default is $mbox or ~/mbox
-
- The "folder" command changes the current folder; with no parameters,
- it prints the name of the current folder. If `!' is specified, the
- current folder is not updated before changing.
-
- The "update" command updates the current folder. In this case, only
- the -N and -r options are observed.
- %%
-
- %prompt%
- This variable controls the prompt that mush will display.
- set prompt = "string"
- The "string" follows printf style formatting conventions:
- %F full path of the current working folder
- %f name (path tail) of the current folder
- %m current message number
- %n number of new messages
- %u number of unread messages
- %d number of deleted messages
- %t total number of messages
- %T current time
- %N day of the month (number) (today)
- %W weekday name (today)
- %M month name (this month)
- %Y year (this year)
- %y year (last 2 digits only)
- \n newline
- \t tab
- %%
-
- %quit%
- quit/exit
-
- These commands end a mush session. "quit" will update your
- mailbox; if new mail has come in, you will be told so and given
- an option whether to really quit or not. "exit" will leave mush
- neither updating your mailbox nor checking for new mail.
- %%
-
- %ls%
- The "ls" command is exactly like the UNIX command "ls". All
- parameters are the same. The variable "lister" can be set to
- a list of default parameters, thus avoiding having to specify
- them all the time. The "folders" command is equivalent to
- doing "ls $folder" from the Mush prompt.
- %%
-
- %shell%
- sh [command]
-
- If a "command" is given, that UNIX command will be executed
- under the Bourne shell. If no command is specified, then an
- interactive shell will be started. The environment variable
- SHELL or the local mail shell variable shell describes the
- shell to invoke. If none is set, then the default shell is
- defined by the system administrator (currently set to csh).
-
- Users on systems with job control will probably have little
- use for the sh command.
- %%
-
- %stop%
- The stop command sends a stop signal to the mail shell. It is
- equivalent to ^Z as it will stop the process. Since the shell
- never needs to be exited, the command 'q' may be aliased to
- "stop" and the shell may have
- alias mail %mush
- (assumes csh) which will bring mush into the foreground rather
- than having to invoke a new shell. New mail will be read into
- the shell automatically and much time and energy is saved.
- %%
-
- %curses%
- The curses-based interface for Mush does not require a graphics
- display, but does requires a terminal which can handle upline
- cursor movement capabilities. All commands are one or two
- keystroke commands and are executed as soon as the key is typed.
-
- For a list of current key-to-command bindings, use the "bind"
- command (defaults to 'b' in curses mode).
- %%
-
- %bind%
- bind <sequence> <curses-command> [ <parameters> ]
-
- Binding is done for the curses interface only. It allows the
- user to bind keystrokes or key sequences to curses-interface
- commands. You cannot bind keystrokes to regular mush commands
- using bind.
-
- A bound key-sequence (input by the user) will be converted into
- the curses command it is bound to. For a list of all curses
- commands, issue the "bind" command and follow the instructions
- to get a list. Currently, parameters are ignored for all curses
- commands except the special command "macro".
-
- When specifying sequences, you may enter almost anything at the
- keyboard that you want to type. This includes most control
- characters. A special syntax is provided to specify control
- characters if you wish to set up default key bindings in your
- initialization file without using real control characters.
-
- To bind keystrokes that are control characters in the
- initialization file, you must use the notation "\CX" where "X"
- is an upper-case letter representing the control key you want to
- use. "\CN" would be control-N; "\n" is carriage return. You may
- not bind keyboard generated signals; for most users, those key
- sequences are control-C and control-\. For users with job
- control, the suspend characters (usually control-Z and
- control-Y) are also ignored.
-
- To specify the escape key, use "\E"; "\C[" will not work.
-
- Trying to bind a key sequence which prefixes another sequence is
- an error and the user is warned that the longer binding will not
- work. The binding will take place, however, because it is
- possible to unbind the shorter sequence, thus validating the
- longer sequence.
-
- The special curses command "macro" allows a string to be
- executed just as if the user typed it directly. Issue the
- "bind-macro" command for more details.
- %%
-
- %msg_flags%
- flags [msg_list] [[+|-] [D N O P R S r U]]
-
- This command displays the status of messages by default.
- If a list is specified, it will tell which bits of the
- message are set: Delete, New, Old, Preserved, Read, Saved
- replied-to, and Unread. If any (one or more) of the bits
- are given and no + or - modifier is specified, then the
- status of each message in the list will be set to that
- status absolutely (other status flags are lost). However,
- if a + or - is specified, then the status is modified for
- that bit to on (+) or off (-).
-
- If no list is given, then the list of messages is taken
- from a pipe (if piped) or the current message is used.
- %%
-
- %setenv%
- setenv VARIABLE [value]
-
- Variable names may be any string, but traditionally environment
- variables are all upper case. If no "value" is specified, then
- the variable name will be set to an empty string. If the value
- contains spaces, you should enclose the string in quotation
- marks. Use printenv to print a list of all your environment
- variables.
- %%
-
- %unsetenv%
- unsetenv VARIABLE
-
- You must specify one and only one variable to unset in your
- environment variable settings. Use printenv to print a list of
- all your environment variables.
- %%
-
- %edit_msg%
- edit_msg [msg_list]
-
- The "edit_msg" command lets you edit messages in your folder.
- When editing messages, be careful not to remove certain message
- headers such as Date:, From:, or any others that look important.
- If you remove or change something you shouldn't have, you will
- be notified and the temporary file used to edit the message will
- not be removed.
- %%
-
- %bind-macro%
- bind-macro [<sequence> [<expansion>]]
-
- The "bind-macro" command allows you to set macros in curses
- mode, so that one keystroke (or a few) will act as though you
- had typed a longer sequence. Using "bind-macro" is equivalent
- to specifying the "macro" special command as a parameter to
- the "bind" command.
-
- Given no parameters, "bind-macro" will list all current curses
- mode macros. Given only a <sequence>, it will show the current
- binding for that sequence. Given both a <sequence> and an
- <expansion>, it will create a macro such that, when the
- <sequence> is typed in curses mode, the effect will be the same
- as if the <expansion> had been typed instead.
-
- The same format for control characters that is used for the
- "bind" command may be used in both the <sequence> and the
- <expansion>, i.e.,
- \Cx control-x (where x is a capital letter)
- \E the escape character (\C[ does NOT work!)
- \n a newline (other C-style escapes also work)
-
- Example:
- bind-macro F [folder]+record\n
-
- If you are in curses mode and hit the F key, then the curses
- mode command "folder" will execute and +record (followed by
- a carriage return) will be entered as if you typed it.
-
- Also see the "map" and "map!" commands.
- %%
-
- %map%
- map [<sequence> [<expansion>]]
-
- The "map" command allows you to use one keystroke (or a few) and
- have it act as though you had typed a longer sequence.
-
- Given no parameters, "map" will list all current line mode
- macros. Given only a <sequence>, it will show the current
- binding for that sequence. Given both a <sequence> and an
- <expansion>, it will create a macro such that, when the
- <sequence> is typed in line mode, the effect will be the same
- as if the <expansion> had been typed instead.
-
- The same format for control characters that is used for the
- "bind" command may be used in both the <sequence> and the
- <expansion>, i.e.,
- \Cx control-x (where x is a capital letter)
- \E the escape character (\C[ does NOT work!)
- \n a newline (other C-style escapes also work)
-
- Example:
- map & print\n
-
- If you are not in curses mode and hit the & key, then it will
- be as if you typed the word "print" and hit carriage return.
-
- To type a character without having the mapping expanded, precede
- the character with a backslash (\).
-
- Also see the "map!" and "bind" commands.
- %%
-
- %map!%
- map! [<sequence> [<expansion>]]
-
- The "map!" command allows you to set macros in message
- composition mode, so that one keystroke (or a few) will act
- as though you had typed a longer sequence. map!'s take
- effect regardless of whether you started the letter from
- curses mode or line mode.
-
- Given no parameters, "map!" will list all composition mode
- macros. Given only a <sequence>, it will show the current
- binding for that sequence. Given both a <sequence> and an
- <expansion>, it will create a macro such that, when the
- <sequence> is typed in message composition mode, the effect will
- be the same as if the <expansion> had been typed instead.
-
- The same format for control characters that is used for the
- "bind" command may be used in both the <sequence> and the
- <expansion>, i.e.,
- \Cx control-x (where x is a capital letter)
- \E the escape character (\C[ does NOT work!)
- \n a newline (other C-style escapes also work)
-
- Example:
- map! ! <BANG>
-
- If you are typing in a letter regardless of which interface you
- use and you hit the ! key, then it would be as if you typed the
- keys "<BANG>".
-
- To type a character without having the mapping expanded, precede
- the character with a backslash (\).
-
- Also see the "bind" and "map" commands.
- %%
-
- %eval%
- eval args ...
-
- This command causes its arguments to be re-parsed and then
- executed as a mush command. Example:
- set initprompt='"$hostname:$cwd "'
- eval set prompt=$initprompt
- %%
-
- %pipe_msg%
- pipe [msg-list] unix-command
-
- The specified unix-command is executed. The standard input of
- the command is the texts of listed messages, including headers
- that are not ignored (see "ignore -?" and "set ?show_hdrs"). If
- this command is part of a mush pipeline (|) then any list of
- messages given is added to those taken from the pipeline. If no
- msg-list is given and there is no pipeline, the current message
- is used. The unix-command is executed via "sh", so csh aliases
- may not be used.
-
- If invoked with a capital letter (Pipe), only the bodies of the
- messages will be fed to the unix-command -- all headers will be
- omitted.
-
- Examples:
- pipe 2 7 more -- send messages 2 and 7 through "more"
- pipe patch -- send the current message to "patch"
- 1 | Pipe nroff -- send the body of message 1 to "nroff"
- %%
-
- %merge%
- merge [-N] folder-name
-
- The contents of the specified folder are read into the current
- folder. If -N is not specified, a header summary is printed
- for each message read (see "headers -?").
-
- A list of all the merged messages is returned for use in pipes.
- %%
-
- %echo%
- echo [-n] [-h | -p] args
-
- Echo simply echoes the parameters to the command back to the user.
-
- If the -n flag is given, then no newline is appended.
- If the -h flag is given, then echo looks for formatting parameters
- as if the "from" command were given on the "current" message.
- If the -p flag is given, then echo looks for formatting parameters
- as if your prompt were changed temporarily.
-
- Examples:
- echo -h This message is from %a and is dated %d
- might produce:
- This message is from island!argv and is dated Dec 14, 1988.
-
- echo -p There are %n new messages to read in %f.
- might produce:
- There are 5 new messages to read in /usr/spool/mail/argv.
-
- Note that -h and -p cannot be specified together.
- %%
-
- %undigest%
- undigest [-m] [msg_list] [filename]
-
- A "digest" is a mail message which is a collection of other mail messages
- mailed to a "moderator" by other users. The moderator compiles all the
- messages into a folder and sends the result to all the subscribers of the
- mailing list. The undigest command disassembles the entries into the set
- of messages which comprises the digest.
-
- The -m option will merge these messages into the current folder. Otherwise,
- if a filename is specified, a new folder is created and the user can change
- folders to read the messages separately.
-
- If a message list is specified, each digest is disassembled to the same
- filename (if given). If no filename is given and the user did not request
- a merge, then a folder is created based on the subject of the digest.
- %%
-