home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / MUSHP71.ZIP / CMD_HELP next >
Text File  |  1990-12-20  |  39KB  |  1,071 lines

  1. /* @(#)cmd_help    1.4    10/24/88 (Dan heller) */
  2.  
  3. %?%
  4.       ? [command]
  5.  
  6. The `?' command will give you a list of legal commands.  Most
  7. commands accept -? as an option.  This will give you specialized
  8. help with that particular command.
  9.  
  10. If the optional argument is given, help for that command is shown.
  11. %%
  12.  
  13. %ignore%
  14.       ignore/unignore [headers]
  15.  
  16. Use this command to set the message headers you would like not
  17. to be printed when you read a message. If no header specified,
  18. then a list of all headers currently being ignored is printed.
  19. You must specify a header for unignore.
  20.  
  21. You can set the variable $alwaysignore to force normally
  22. ignored headers to be ignored while saving messages, forwarding
  23. messages or including messages into message buffers.
  24.  
  25. See also the variable $show_hdrs.
  26. %%
  27.  
  28. %set%
  29.       set/unset [variable [= value]]
  30.  
  31. With no parameters, set lists all variables and their values.
  32. To set a boolean variable (on or off), use:
  33.     set variable
  34. To set a variable's value to a string, use:
  35.     set variable = value
  36.  
  37. If you want double-quotes or white-space embedded in a string,
  38. encase the string in single quotes.  If you want single quotes
  39. in a string, encase the string in double quotes.
  40.  
  41. For a list of all variables with special meanings, use:
  42.     set ?all
  43. For help on a particular one of these variables, use:
  44.     set ?variable_name
  45. %%
  46.  
  47. %readmsg%
  48.       print [msg_list]
  49.       type [msg_list]
  50.       top [msg_list]
  51.       next [msg_list]
  52.       previous [msg_list]
  53.  
  54. You can read messages in different ways.  "type" and "print"
  55. will print the current message.  "top" will only print the first
  56. N lines of the current message where N is the value of the
  57. variable "crt".  "next" will go to the next unread message and
  58. print that.  "previous" will go back and read the first unread
  59. message previous to the current.  "^" will print the first
  60. message, "$" will print the last.
  61.  
  62. Any of these commands can be followed by a message list, and
  63. each message in that list will be printed (or piped to other
  64. commands).
  65.  
  66. See also "help msg_list" and the variable $autoprint.
  67. %%
  68.  
  69. %alts%
  70.       alts [hostnames]
  71.  
  72. The alts command sets a list of hostnames on which you have an
  73. account.  Normally, when you respond to all recipients of mail,
  74. your account name will be listed as if you wished to send
  75. yourself mail.  If you don't have metoo set, then your name will
  76. be removed from the mailing list if your login name is on the
  77. list and the host specified is in the alternates list.  The
  78. special parameter `*' instructs alts to match all hostnames; in
  79. that case, only the login name is tested.
  80. %%
  81.  
  82. %source%
  83.       source/saveopts [file]
  84.  
  85. The source/saveopts commands will load/save all variable
  86. settings, options, aliases, cmd's, ignored headers ...
  87. everything you can set, it loads or saves.  The file read or
  88. written follows these rules:
  89.  
  90. 1) If a filename is given, that file is used
  91. 2) The file described by the environment variable MAILRC
  92. 3) In the user's home directory: .mushrc (if it exists)
  93. 4) In the user's home directory: .mailrc (if it exists)
  94.  
  95. If saveopts is used and the file exists, confirmation will be
  96. requested before the file is overwritten.
  97. %%
  98.  
  99. %help%
  100.       help [item]
  101.  
  102. Type "help" with no arguments for a list of valid items.
  103. %%
  104.  
  105. %general%
  106. This is the general help message.  To get help on a specific
  107. command, try "command -?".  Extended help is given by typing
  108. "help item" where item is one of:
  109.     path, msg_list, prompt, hdr_format
  110. Help with msg_list is highly advisable!
  111.  
  112. Type "?" to get a list of available commands.  Try "? command"
  113. to get help on the particular command that you specify.
  114.  
  115. Use "set ?variable" to get help with specific variables.
  116. %%
  117.  
  118. %path%
  119. Whenever "path" is specified, the following syntax is legal
  120. besides the normal path addressing scheme used by unix:
  121.  ~[user]   -- the home directory of specified user (yours by default)
  122.  %[user]   --/usr/spool/mail/login_name [user_name] (yours by default)
  123.  +file     --the directory described by `set folder'; file is `file'
  124. %%
  125.  
  126. %msg_list%
  127. A "msg_list" references one or more messages.  The user
  128. specifies a group of messages according to a special syntax.
  129.  
  130.  *      All messages.
  131.  ^      The first message.
  132.  $      The last message.
  133.  .      The current message.
  134.  N-M    A range of messages between N and M, inclusive.
  135.  
  136. In the last case, N and M may be * ^ $ . or digits referencing
  137. explicit message numbers.  The range must be in ascending order.
  138.  
  139. You can also negate messages by placing the message list inside
  140. braces, `{' `}' -- thus, the expression "2-19 {11-14}"
  141. references messages 2 through 19 except for those from 11
  142. through 14.
  143.  
  144. Commands can be "piped" to one another, because the return value
  145. of a command is a msg_list, not text.  For example,
  146.     pick -f fred | lpr
  147. will find all messages "from fred" and send them to the printer.
  148.  
  149. Commands dealing with more than one message process them in
  150. numeric order -- not necessarily the order specified.  Thus, the
  151. command "save 1-5 9 7 6 file" will save the messages in
  152. ascending order, not in the order given.
  153. %%
  154.  
  155. %hdr_format%
  156. This variable controls the display of message headers.  Use:
  157.     set hdr_format="string"
  158. to change the header display.  The string uses printf style
  159. formatting and follows these conventions:
  160.     %a  address of the author
  161.     %c  number of characters (bytes) in the message
  162.     %d  entire date of the message (see "date_received" variable)
  163.     %f  "From" field (author name and address)
  164.     %i  the message-id (may or may not be present)
  165.     %l  number of lines in the message
  166.     %M  month name of the message
  167.     %N  day of the month (number)
  168.     %n  name of the author
  169.     %s  subject of the message
  170.     %t  "To" field (recipients)
  171.     %T  time of the message (see "mil_time" variable)
  172.     %W  day of the week (Sun, Mon, etc.)
  173.     %Y  year of the message 
  174.     %y  year (last 2 digits only)
  175.     \n  a newline
  176.     \t  a tab
  177.  
  178. A field specifier may be used in any % expansion.  Thus, "%20s"
  179. will print the first 20 characters of the Subject.  No matter
  180. what the formatting string, the message number, the status of
  181. the message and a '>' (if this is the "current" message) is
  182. before any user defined format is printed.
  183. %%
  184.  
  185. %prompt%
  186. This variable controls the prompt that mush will display.
  187.     set prompt = "string"
  188. The "string" follows printf style formatting conventions:
  189.     %F  full path of the current working folder
  190.     %f  name (path tail) of the current folder
  191.     %m  current message number
  192.     %n  number of new messages
  193.     %u  number of unread messages
  194.     %d  number of deleted messages
  195.     %t  total number of messages
  196.     %T  current time
  197.     %N  day of the month (number) (today)
  198.     %W  weekday name (today)
  199.     %M  month name (this month)
  200.     %Y  year (this year)
  201.     %y  year (last 2 digits only)
  202.     \n  newline
  203.     \t  tab
  204. %%
  205.  
  206. %preserve%
  207.       preserve [msg_list]
  208.  
  209. The "preserve" command marks messages to be saved in your system
  210. mailbox.  Unless explicitly preserved, all mail that you read
  211. will be saved in ~/mbox (or the file specified by $mbox).  Deleted
  212. messages are preserved only if also undeleted (see "delete -?").
  213. When a message is preserved, the `P' status bit will appear in the
  214. header summary display for that message.
  215.  
  216. The "unpreserve" command reverses the effect of "preserve".
  217.  
  218. Setting the boolean variable $hold is equivalent to preserving
  219. each message as you read it, except that no `P' status is set.
  220. %%
  221.  
  222. %save%
  223.       save/write/copy [-s|-S|-a|-A] [-f] [msg_list] [filename]
  224.  
  225. If no filename is specified, ~/mbox (or the value of the
  226. variable "mbox") is used.  Save and write will append msg if
  227. `file' already exists.  Specifying -f will overwrite the
  228. file (e.g., erasing it first).
  229.  
  230. To save messages to a filename beginning with a digit, escape
  231. the filename with a backslash (\).
  232.  
  233. The "write" command will write message without the headers (msg
  234. body only).  Save and write both mark messages for deletion
  235. unless $keepsave is set.  The "copy" command is identical to
  236. "save" except that messages are not marked for deletion
  237. (identical to having the variable "keepsave" set).
  238.  
  239. The -s and -S options save messages to files named by the
  240. subject of the message.  If more than one message is specified,
  241. then the message subject of each message is used.  If -S is
  242. specified, then the subject of the first message is used for all
  243. messages.  Spaces and forward slashes (/) are converted to
  244. underscores (_).
  245.  
  246. The -a and -A options save messages by author's login name.
  247. %%
  248.  
  249. %lpr%
  250.       lpr [-n] [-h] [msg_list]
  251.  
  252. Send a message to the printer.  The options are:
  253.   -n      print body of message only (no headers)
  254.   -h      do not print ignored headers
  255.   -Pxx    print on printer xx
  256.  
  257. The variable $printer can be used to specify a default printer;
  258. for example, "set printer=lp" is the same as always using "-Plp".
  259. The variable $print_cmd can be used to specify a program other
  260. than "lpr" to use for printing.
  261.  
  262. See also the variable $alwaysignore.
  263. %%
  264.  
  265. %mail%
  266.       mail [mail-flags] [recipients]
  267.  
  268. Compose and send a mail message.  The possible flags are:
  269.   -b bcc-addrs    set blind-carbon-copy recipients
  270.   -c cc-addrs     set carbon-copy recipients
  271.   -e              immediately enter editor (autoedit)
  272.   -E              edit outgoing headers
  273.   -f [msg-list]   forward msg-list (not indented)
  274.   -F              add fortune to the end of message
  275.   -h file         read file as prepared draft (with headers)
  276.   -H file         read file as prepared text (without headers)
  277.   -i [msg-list]   include msg-list in letter
  278.   -I [msg-list]   include msg-list with headers in letter
  279.   -s [subject]    prompt for or set subject
  280.   -u              do not append signatures and fortunes
  281.   -U              send draft immediately (use with -h or -H)
  282.   -v              verbose (not available on some systems)
  283.  
  284. The -f option will add new headers and automatically send the
  285. indicated messages to the list of recipients unless -E or -e
  286. is also given.  The -I and -i options will read the indicated
  287. messages into the text of your letter, surrounded by the text
  288. of variables pre_indent_str, indent_str, and post_indent_str.
  289.  
  290. The -h option reads a draft file, which should already include
  291. message headers.  The -H option reads a text file, which should
  292. NOT include headers.  If the -U option is also given, the draft
  293. is sent immediately.
  294.  
  295. See also the variables $ask, $askcc, $autoedit, $autoinclude,
  296. $autosign, $autosign2, $dot, $edit_hdrs, $escape, $fortune,
  297. $fortunates, $logfile, $record, $no_expand, $no_hdrs, $realname,
  298. $sendmail, $verbose, $verify, and $wrapcolumn.
  299. %%
  300.  
  301. %respond%
  302.       replysender/replyall [msg-list] [-r path] [mail-flags] [recipients]
  303.  
  304. The "replysender" command replies only to the sender of a
  305. message, whereas "replyall" responds to everyone on the To: and
  306. Cc: lines of the message.
  307.  
  308. The command "reply" is identical to "replysender".
  309.  
  310. If a message list is indicated, then each message on the list is
  311. replied to in the same manner.  If -r is specified with a host or
  312. path (uucp-style), then each address in the list is routed via
  313. this path.  This overrides the value of auto_route (see man page).
  314.  
  315. The address of the author is obtained from certain headers in
  316. his message to you.  Unless you specify otherwise, mush will
  317. search for the headers Reply-To: Return-Path: and From:.  You
  318. can override these values by setting the variable reply_to_hdr.
  319.  
  320.     set reply_to_hdr = "sender reply-to return-path from_"
  321.  
  322. This example shows that mush will search for (in order), the
  323. headers listed in the reply_to_hdr variable.  If one header isn't
  324. found, then mush looks for the next in the list.  If none of the
  325. headers in the list are found, the default headers (mentioned
  326. above) are searched.  The last header listed in the example is
  327. the special "From " header.  See the man page for more details.
  328.  
  329. Type "mail -?" for information on legal mail flags.
  330.  
  331. See also the variables $auto_route, $domain_route, $in_reply_to,
  332. $known_hosts, $metoo, $reply_to_hdr, and those listed by "mail -?".
  333. %%
  334.  
  335. %sort%
  336.       sort [-] [a|d|l|R|s|S]
  337.   a         by author (alphabetical)
  338.   d         according to date
  339.   l         by length (size)
  340.   R         by subject including Re: (alphabetical)
  341.   s         by subject ignoring Re: (alphabetical)
  342.   S         by status
  343.  
  344. The optional `-' flag will reverse the order of sorting.  By
  345. default (no parameters), sort sorts messages by status:  New,
  346. unread messages are first, followed by preserved messages and
  347. finally the deleted messages are placed at the end.
  348.  
  349. If the $date_received variable is set, sorting by date is
  350. done using the date you received the message.  Otherwise,
  351. messages are sorted by date sent by the original author.
  352.  
  353. See also the variable $sort.
  354. %%
  355.  
  356. %pick%
  357.       pick [+<num>] [-<num>] [-r msg_list] [-x] [-i] [-h hdr] [-f|s|t]
  358.     [-d [-][date]] [-ago [+|-] [n days] [n weeks] [n months]] [[-e] <pat>]
  359.  
  360. Search for patterns within messages.  Entire messages are
  361. searched for <pattern> unless -f, -h, -s, or -t is specified.
  362. Only one of -d, -f, -h, -s, -t and -ago can be specified; no
  363. pattern is used with -d and -ago; and -x may not be used in
  364. conjunction with +<num> and/or -<num>.
  365.  
  366.   +<num>        return only the first <num>ber messages matched
  367.   -<num>        return only the last <num>ber messages matched
  368.   -x            return all the messages which do NOT match
  369.   -e        remaining arguments are the <pat> (`e'xpression)
  370.   -f            match pattern in the "From:" field (author) only
  371.   -s            match pattern in the "Subject:" header only
  372.   -t            match pattern in the "To:" field only
  373.   -h hdr        match pattern in specified header field only
  374.   -i            ignore case of letters in when matching
  375.   -r msg_list   restrict the range of messages search to msg_list
  376.   -d            select messages sent on [+ after] [- before] date
  377.         A "date" is of the form:  [+-][month]/[date[/year]]
  378.         Omitted fields default to today's values.  Examples:
  379.           pick -d 4/20     messages on Apr 20, this year
  380.           pick -d -/2/85   on or before the 2nd, this month, 1985
  381.           pick -d +5/4     on or after May 4, this year
  382.           pick -d /        finds today's messages only
  383.         At least one `/' char must be used in a date.  There is
  384.     no strong date checking; 2/30 would be considered valid.
  385.   -ago          select messages relative to the current date
  386.     Date formats for "ago" are more verbose than for -d; see
  387.     the manual page for details.
  388.  
  389. Examples:
  390.     Find the first 5 messages with the subject "Telephone Message":
  391.     pick +5 -s Telephone Message
  392.     Find the first 2 messages of the last 4 that are to "mush-users":
  393.     pick -4 +2 -t mush-users
  394.     Find those among messages 1 to 10 that are 2 months or more old:
  395.     pick -r 1-10 -ago -2m
  396.     Find messages that are 1 week old or newer:
  397.     pick -ago +1w
  398.     Find messages that contain "-request" in the Resent-From field:
  399.     pick -h resent-from -e -request
  400.  
  401. A description of the pick operation will be printed before the search
  402. is performed, unless the value of the variable $quiet contains the
  403. field "pick", or pick is piped to another mush command.
  404. %%
  405.  
  406. %alias%
  407.       alias [name [namelist]]
  408.  
  409. Options for alias:
  410.  alias                       print all namelists
  411.  alias name                  print namelist associated with name
  412.  alias name namelist         set "name" to the value of namelist
  413.  unalias namelist            unalias names in namelist
  414.  
  415. A "namelist" consists of one or more addresses.  An address may
  416. be a name already set to another list, a valid user, a file or
  417. a program.  Filenames must be full pathnames, i.e., they must
  418. begin with a '/' (or with a ~, which expands to some home dir).
  419. A "program" must start with a pipe symbol and be encased in
  420. quotes:
  421.  
  422.     "|program_name"
  423.  
  424. The command "expand" will print addresses (including sublists)
  425. associated with the given alias.
  426.  
  427. See also the variable $no_expand.
  428. %%
  429.  
  430. %from%
  431.       from [+|-] [msg-list]
  432.  
  433. With no parameters, "from" will print the current message's
  434. header line.  If given a message list, "from" will print the
  435. headers of the listed messages.
  436.  
  437. The special parameters `-' and `+' can be given to move the
  438. current message pointer to the previous or next message
  439. respectively, while also printing that message's header.
  440.  
  441. If a message list was given in addition to `-' or `+', then
  442. the current message pointer will be set to the first or last
  443. message, respectively, in the message list given.
  444.  
  445. Examples:
  446.  
  447.     from - 10-30 {16}
  448. will print the headers of messages 10 through 30 except for
  449. message 16 and set the current message pointer to 10.
  450.  
  451.     pick -f Dan | from +
  452. will print the headers of all messages that contain "Dan" in the
  453. author's name and set the current message pointer to the last
  454. one of that kind in the list.
  455.  
  456.     from +
  457. will print the header of the message after the current message
  458. and increment the current message pointer to that message.
  459.  
  460. See also the "headers" command and "help hdr_format".
  461. %%
  462.  
  463. %my_hdr%
  464.       my_hdr [header[: string]]
  465.  
  466. This command is used to set, unset or view your personalized
  467. message headers.  These headers are included in all your
  468. outgoing mail.
  469.  
  470. Options for my_hdr:
  471.   my_hdr            show all headers
  472.   my_hdr header            show value of header
  473.   my_hdr header: string        set header to string
  474.   un_hdr header            unset header
  475.  
  476. Note that there is no space between the header name and the
  477. colon in the third form of the command.
  478. %%
  479.  
  480. %fkey%
  481.       fkey [<sequence> [command]]
  482.       unfkey <sequence>
  483.  
  484. This command is used to make function key settings in Suntools
  485. (graphics) mode.  When run as a tool (-t on command line),
  486. choose the Options item, and the "function key" menu option.
  487.  
  488. The unfkey command removes the setting for a given string.
  489. %%
  490.  
  491. %cmd%
  492.       cmd [name [value]]
  493.  
  494. This function is used to establish command aliases; cmd's are
  495. just like aliases in the C-shell.  Options are:
  496.   cmd                       view all commands
  497.   cmd command               show value of command
  498.   cmd command value         set command to value
  499.   uncmd command             unset command
  500.  
  501. The value must be quoted if it is to contain command separators
  502. such as `;' or `|'.
  503.  
  504. If you want to reference history commands within a cmd,
  505. escape the ! with a backslash.  For example:
  506.  
  507.     cmd r 'replysender \!* ; delete -t'
  508.  
  509. will cmd "r" to reply using whatever parameters you have given on
  510. the command line and then delete that message and print the next
  511. message (-t parameter to "delete").
  512. %%
  513.  
  514. %headers%
  515.       headers [+|-|N] [[-H]:c]
  516.   +    print the next screenful (or use the 'z' command).
  517.   -    print the previous screenful (or use 'z-' ).
  518.   N    print a screenful starting at message number N.
  519.   -H:c  where `c' is one of
  520.      a  all messages (mostly for the mush startup option -H:c)
  521.      d  deleted messages
  522.      n  new messages
  523.      o  old messages
  524.      p  preserved messages
  525.      r  replied-to messages
  526.      s  saved messages
  527.      u  unread messages
  528.  
  529. The "headers" command prints out a screenful of headers.
  530. Deleted messages are not normally shown; set "show_deleted" to
  531. include deleted messages.
  532.  
  533. The command ":c" is equivalent to "headers -H:c".  The -H can be
  534. omitted, i.e., "headers :c" will also work.
  535.  
  536. See also "help hdr_format".
  537. %%
  538.  
  539. %folder%
  540.       folder [-N] [-r] [!] [%[user]|#|&|file]
  541.  
  542.   -N       Do not display the list of headers
  543.   -r       read only mode (cannot write changes to this folder)
  544.   %[user]  change to /usr/spool/mail/[user] (you by default)
  545.   #        change to folder accessed previous to current folder
  546.   &        change to "mbox" -- default is $mbox or ~/mbox
  547.  
  548. The "folder" command changes the current folder; with no parameters,
  549. it prints the name of the current folder.  If `!' is specified, the
  550. current folder is not updated before changing.
  551.  
  552. The "update" command updates the current folder.  In this case, only
  553. the -N and -r options are recognized.
  554.  
  555. See also the variable $folder.
  556. %%
  557.  
  558. %quit%
  559.       quit/exit
  560.  
  561. These commands end a mush session.  "quit" will update your
  562. mailbox; if new mail has come in, you will be told so and given
  563. an option whether to really quit or not.  "exit" will leave mush
  564. neither updating your mailbox nor checking for new mail.
  565. %%
  566.  
  567. %ls%
  568.       ls [options]
  569.  
  570. The "ls" command is exactly like the UNIX command "ls".  All
  571. parameters are the same.  The "folders" command is equivalent
  572. to doing "ls -FR $folder" from the Mush prompt.
  573. %%
  574.  
  575. %shell%
  576.       sh [command]
  577.  
  578. If a "command" is given, that UNIX command will be executed
  579. under the Bourne shell.  If no command is specified, then an
  580. interactive shell will be started. The environment variable
  581. SHELL or the local mail shell variable $shell describes the
  582. shell to invoke.  If none is set, then the default shell is
  583. defined by the system administrator (currently set to csh).
  584.  
  585. Users on systems with job control will probably have little
  586. use for the sh command.
  587. %%
  588.  
  589. %stop%
  590.       stop
  591.  
  592. The stop command sends a stop signal to the mail shell.  It is
  593. equivalent to your tty job-control stop character (often ^Z).
  594. Since the mush shell never needs to be exited, the command 'q'
  595. may be "cmd"ed to "stop;await" and csh users may have
  596.     alias mail %mush
  597. to bring mush into the foreground rather than having to invoke
  598. it again.  New mail will be read into the shell automatically
  599. and much time and energy is saved.
  600. %%
  601.  
  602. %curses%
  603.       curses
  604.  
  605. The curses-based interface for Mush does not require a graphics
  606. display, but does requires a terminal which can handle upline
  607. cursor movement capabilities.  All commands are one or two
  608. keystroke commands and are executed as soon as the key is typed.
  609.  
  610. For a list of current key-to-command bindings, use the "bind"
  611. command (defaults to 'b' in curses mode).
  612.  
  613. See also the variable $curses_help.
  614. %%
  615.  
  616. %bind%
  617.       bind [<sequence> <curses-command> [<parameters>]]
  618.       unbind <sequence>
  619.  
  620. Binding is done for the curses interface only.  It allows the
  621. user to bind keystrokes or key sequences to curses-interface
  622. commands.  You cannot bind keystrokes to regular mush commands
  623. using bind.
  624.  
  625. A bound key-sequence (input by the user) will be converted into
  626. the curses command it is bound to.  For a list of all curses
  627. commands, issue the "bind" command and follow the instructions
  628. to get a list.  Currently, parameters are ignored for all curses
  629. commands except the special command "macro".
  630.  
  631. When specifying sequences, you may enter almost anything at the
  632. keyboard that you want to type.  This includes most control
  633. characters.  A special syntax is provided to specify control
  634. characters if you wish to set up default key bindings in your
  635. initialization file without using real control characters.
  636.  
  637. To bind keystrokes that are control characters in the
  638. initialization file, you must use the notation "\CX" where "X"
  639. is an upper-case letter representing the control key you want to
  640. use. "\CN" would be control-N; "\n" is carriage return.  You may
  641. not bind keyboard generated signals; for most users, those key
  642. sequences are control-C and control-\.  For users with job
  643. control, the suspend characters (usually control-Z and
  644. control-Y) are also ignored.
  645.  
  646. To specify the escape key, use "\E"; "\C[" will not work.
  647.  
  648. Trying to bind a key sequence which prefixes another sequence is
  649. an error and the user is warned that the longer binding will not
  650. work.  The binding will take place, however, because it is
  651. possible to unbind the shorter sequence, thus validating the
  652. longer sequence.
  653.  
  654. The special curses command "macro" allows a string to be
  655. executed just as if the user typed it directly.  Issue the
  656. "bind-macro" command for more details.
  657.  
  658. Bindings are removed with the "unbind" command.
  659. %%
  660.  
  661. %msg_flags%
  662.       flags [[+|-] [flag-bits]] [msg-list]
  663.  
  664. Any sensible combination of these flag-bits may be used:
  665.   D    deleted
  666.   f    forwarded
  667.   N    new
  668.   O    old
  669.   P    preserved
  670.   p    printed
  671.   R    read
  672.   r    replied-to
  673.   S    saved
  674.   U    unread
  675.  
  676. This command displays the status of messages by default.
  677. If a msg-list is specified, it will tell which bits of the
  678. message are set.  If any (one or more) of the bits are
  679. given and no + or - modifier is specified, then the status
  680. of each message in the list will be set to that status
  681. absolutely (other status flags are lost).  However, if a +
  682. or - is specified, then the status is modified for that bit
  683. to on (+) or off (-).
  684.  
  685. If no list is given, then the list of messages is taken
  686. from a pipe (if piped) or the current message is used.
  687. %%
  688.  
  689. %setenv%
  690.       setenv VARIABLE [value]
  691.  
  692. Variable names may be any string, but traditionally environment
  693. variables are all upper case.  If no "value" is specified, then
  694. the variable name will be set to an empty string.  If the value
  695. contains spaces, you should enclose the string in quotation
  696. marks.  Use printenv to print a list of all your environment
  697. variables.
  698. %%
  699.  
  700. %unsetenv%
  701.       unsetenv VARIABLE
  702.  
  703. You must specify one and only one variable to unset in your
  704. environment variable settings.  Use printenv to print a list of
  705. all your environment variables.
  706. %%
  707.  
  708. %printenv%
  709.       printenv [VARIABLE]
  710.  
  711. Display the entire current environment, or the value of the
  712. specified environment variable.
  713.  
  714. Also see "setenv" and "unsetenv".
  715. %%
  716.  
  717. %edit_msg%
  718.       edit [msg_list]
  719.  
  720. The "edit" command lets you edit messages in your folder.  The
  721. editor used is determined by the variable $editor, the environment
  722. variable EDITOR, the variable $visual and the environment variable
  723. VISUAL in that order.  If none of those variables are set, the
  724. default visual editor will be used.  The "v" command is the same
  725. as "edit" but will test only $visual and VISUAL.
  726.  
  727. When editing messages, be careful not to remove certain message
  728. headers such as Date:, From:, or any others that look important.
  729. If you remove or change something you shouldn't have, you will
  730. be notified and the temporary file used to edit the message will
  731. not be removed.
  732. %%
  733.  
  734. %bind-macro%
  735.       bind-macro [<sequence> [<expansion>]]
  736.  
  737. The "bind-macro" command allows you to set macros in curses
  738. mode, so that one keystroke (or a few) will act as though you
  739. had typed a longer sequence.  Using "bind-macro" is equivalent
  740. to specifying the "macro" special command as a parameter to
  741. the "bind" command.
  742.  
  743. Given no parameters, "bind-macro" will list all current curses
  744. mode macros.  Given only a <sequence>, it will show the current
  745. binding for that sequence.  Given both a <sequence> and an
  746. <expansion>, it will create a macro such that, when the
  747. <sequence> is typed in curses mode, the effect will be the same
  748. as if the <expansion> had been typed instead.
  749.  
  750. The same format for control characters that is used for the
  751. "bind" command may be used in both the <sequence> and the
  752. <expansion>, i.e.,
  753.     \Cx     control-x (where x is a capital letter)
  754.     \E      the escape character (\C[ does NOT work!)
  755.     \n      a newline (other C-style escapes also work)
  756.  
  757. Example:
  758.     bind-macro F [folder]+record\n
  759.  
  760. If you are in curses mode and hit the F key, then the curses
  761. mode command "folder" will execute and +record (followed by
  762. a carriage return) will be entered as if you typed it.
  763.  
  764. Macros are removed with the "unbind" command, see "bind -?".
  765.  
  766. Also see the "map" and "map!" commands.
  767. %%
  768.  
  769. %map%
  770.       map [<sequence> [<expansion>]]
  771.       unmap <sequence>
  772.  
  773. The "map" command allows you to use one keystroke (or a few) and
  774. have it act as though you had typed a longer sequence.
  775.  
  776. Given no parameters, "map" will list all current line mode
  777. macros.  Given only a <sequence>, it will show the current
  778. binding for that sequence.  Given both a <sequence> and an
  779. <expansion>, it will create a macro such that, when the
  780. <sequence> is typed in line mode, the effect will be the same
  781. as if the <expansion> had been typed instead.
  782.  
  783. The same format for control characters that is used for the
  784. "bind" command may be used in both the <sequence> and the
  785. <expansion>, i.e.,
  786.     \Cx     control-x (where x is a capital letter)
  787.     \E      the escape character (\C[ does NOT work!)
  788.     \n      a newline (other C-style escapes also work)
  789.  
  790. Example:
  791.     map & print\n
  792.  
  793. If you are not in curses mode and hit the & key, then it will
  794. be as if you typed the word "print" and hit carriage return.
  795.  
  796. To type a character without having the mapping expanded, precede
  797. the character with a backslash (\).
  798.  
  799. Mappings are removed with the "unmap" command.
  800.  
  801. Also see the "map!" and "bind" commands.
  802. %%
  803.  
  804. %map!%
  805.       map! [<sequence> [<expansion>]]
  806.       unmap! <sequence>
  807.  
  808. The "map!" command allows you to set macros in message
  809. composition mode, so that one keystroke (or a few) will act
  810. as though you had typed a longer sequence.  map!'s take
  811. effect regardless of whether you started the letter from
  812. curses mode or line mode.
  813.  
  814. Given no parameters, "map!" will list all composition mode
  815. macros.  Given only a <sequence>, it will show the current
  816. binding for that sequence.  Given both a <sequence> and an
  817. <expansion>, it will create a macro such that, when the
  818. <sequence> is typed in message composition mode, the effect will
  819. be the same as if the <expansion> had been typed instead.
  820.  
  821. The same format for control characters that is used for the
  822. "bind" command may be used in both the <sequence> and the
  823. <expansion>, i.e.,
  824.     \Cx     control-x (where x is a capital letter)
  825.     \E      the escape character (\C[ does NOT work!)
  826.     \n      a newline (other C-style escapes also work)
  827.  
  828. Example:
  829.     map! ! <BANG>
  830.  
  831. If you are typing in a letter regardless of which interface you
  832. use and you hit the ! key, then it would be as if you typed the
  833. keys "<BANG>".
  834.  
  835. To type a character without having the mapping expanded, precede
  836. the character with a backslash (\).
  837.  
  838. Mappings are removed with the "unmap!" command.
  839.  
  840. Also see the "bind" and "map" commands.
  841. %%
  842.  
  843. %eval%
  844.       eval [-h|-p] args ...
  845.  
  846. This command causes its arguments to be re-parsed and then
  847. executed as a mush command.  Example:
  848.  
  849.     set initprompt='"$hostname:$cwd "'
  850.     eval set prompt=$initprompt
  851.  
  852. If the -h flag is given, then eval looks for formatting parameters
  853. as defined for the variable $hdr_format, and expands the formats
  854. for the "current" message before executing the command.  Example:
  855.  
  856.     eval -h pick -f %f
  857.  
  858. will find all messages from the same author as the current message.
  859.  
  860. If the -p flag is given, then eval expands formatting parameters as
  861. as defined for the variable $prompt.  The -h and -p flags may not be
  862. used together in the same eval.
  863. %%
  864.  
  865. %pipe_msg%
  866.       pipe [-p pattern] [msg-list] [unix-command] [cmd-args]
  867.  
  868. This command is used to send a message to a unix command.  The
  869. command will take its input from the message(s) passed to the pipe
  870. command.  By default, the entire message (including headers) is
  871. sent.  Ignored headers (see "ignore -?" and "set ?show_hdrs") can
  872. be suppressed by setting the variable $alwaysignore.
  873.  
  874. You can pipe (|) messages to this command rather than give a
  875. msg-list, but if no msg-list is given and there is no pipe, the
  876. current message is used.  The unix-command is executed via "sh",
  877. so csh aliases may not be used.
  878.  
  879. If invoked with a capital letter (Pipe), only the bodies of the
  880. messages will be fed to the unix-command -- all headers will be
  881. omitted.
  882.  
  883. A pattern can be specified to indicate which line should start
  884. the lines that are sent to the unix command.  The pattern must
  885. match literally (no regular-expressions) at the beginning of a
  886. line.  Once the pattern is found, that line and all succeeding
  887. lines are sent to the unix command.
  888.  
  889. If the unix-command is omitted, then /bin/sh is used and the 
  890. pattern searched for is "#!".  Therefore, "pipe" with no arguments
  891. can be used to treat a message as a shell script.
  892.  
  893. Examples:
  894.     pipe patch         -- send the current message to "patch"
  895.     pipe -p %! lpr     -- send the message to a postscript printer
  896.     pipe 2 7 more      -- send messages 2 and 7 through "more"
  897.     1 | Pipe nroff     -- send the body of message 1 to "nroff"
  898. %%
  899.  
  900. %merge%
  901.       merge [-N] folder-name
  902.  
  903. The contents of the specified folder are read into the current
  904. folder.  If -N is not specified, a header summary is printed
  905. for each message read (see "headers -?").
  906.  
  907. A list of all the merged messages is returned for use in pipes.
  908. %%
  909.  
  910. %echo%
  911.     echo [-n] [-h | -p] args
  912.  
  913. Echo simply echoes the parameters to the command back to the user.
  914.  
  915. If the -n flag is given, then no newline is appended.
  916. If the -h flag is given, then echo looks for formatting parameters
  917. as if the "from" command were given on the "current" message.
  918. If the -p flag is given, then echo looks for formatting parameters
  919. as if your prompt were changed temporarily.
  920.  
  921. Examples:
  922.     echo -h This message is from %a and is dated %d
  923. might produce:
  924.     This message is from island!argv and is dated Dec 14, 1988.
  925.  
  926.     echo -p There are %n new messages to read in %f.
  927. might produce:
  928.     There are 5 new messages to read in /usr/spool/mail/argv.
  929.  
  930. Note that -h and -p cannot be specified together.
  931. %%
  932.  
  933. %undigest%
  934.     undigest [-m] [-p pattern] [msg_list] [filename]
  935.  
  936. A "digest" is a mail message which is a collection of other mail messages
  937. mailed to a "moderator" by other users.  The moderator compiles all the
  938. messages into a folder and sends the result to all the subscribers of the
  939. mailing list.  The undigest command disassembles the entries into the set
  940. of messages which comprises the digest.
  941.  
  942. The -m option will merge these messages into the current folder.  Otherwise,
  943. if a filename is specified, a new folder is created and the user can change
  944. folders to read the messages separately.
  945.  
  946. The -p option specifies an alternate pattern to use as the digest article
  947. separator.  The pattern must match literally at the beginning of a line.
  948. The default pattern is "--------" (eight hyphens).
  949.  
  950. If a message list is specified, each digest is disassembled to the same
  951. filename (if given).  If no filename is given and the user did not request
  952. a merge, then a folder is created based on the subject of the digest.
  953. %%
  954.  
  955. %await%
  956.     await [-T delay]
  957.  
  958. Instructs the shell to wait for new mail to arrive.  New mail is checked
  959. every 30 seconds by default; a different delay can be specified by using
  960. the -T option.
  961.  
  962. If this command is used in a pipe, its output is its input plus the list
  963. of new messages that have arrived.  For example, to show the headers of
  964. all new messages, and set the current message to the first new message:
  965.  
  966.     await | from -
  967.  
  968. The await command terminates only when new mail arrives or a keyboard
  969. interrupt is generated.
  970. %%
  971.  
  972. %cd%
  973.       cd [directory]
  974.  
  975. Change the current working directory to the specified directory,
  976. or to the user's home directory if none was given.
  977.  
  978. If the variable $cdpath is set to a list of directory names,
  979. and the argument directory is not an absolute path, mush will
  980. search the cdpath directories in the order given for the new
  981. directory and change to the first one found.  NOTE:  The current
  982. directory "." MUST BE INCLUDED in the cdpath or it will not be
  983. searched!  This differs from csh, which prefers "." be left out.
  984. %%
  985.  
  986. %pwd%
  987.       pwd
  988.  
  989. Prints the current working directory.  The variable $cwd also
  990. holds the current working directory unless reset by the user.
  991. %%
  992.  
  993. %delete%
  994.       delete/undelete [msg-list]
  995.  
  996. The "delete" command marks the listed messages as deleted.  If
  997. no message list is given, the current message is deleted.
  998.  
  999. Deleted messages are not shown in the header summary display
  1000. except in curses mode and when the variable $show_deleted is set.
  1001. Deleted messages are ignored by the "pipe" command and by the
  1002. commands that display messages (see "print -?"), but most other
  1003. commands include all messages whether deleted or not.
  1004.  
  1005. Deleted messages are lost forever when the folder is updated (by
  1006. the "update" command, by changing folders without the "!" flag,
  1007. or by exiting with "quit").  Messages can be recovered by the
  1008. "undelete" command at any time BEFORE the folder is updated.
  1009.  
  1010. See also the variable $show_deleted.
  1011. %%
  1012.  
  1013. %history%
  1014.       history [-h] [-r] [number]
  1015.  
  1016. Display the command history that mush has recorded, as in csh.
  1017. Option -h suppresses the history numbers, and option -r shows
  1018. the history in reverse order (most recent first).  If a number
  1019. is given, that many commands of history are displayed.
  1020.  
  1021. The number of commands that mush records is controlled by the
  1022. variable $history.  If $history is not set, mush will save only
  1023. the previous command (equivalent to history=1).
  1024.  
  1025. The basic forms of history reference are (N is a number and
  1026. str is any string):
  1027.  
  1028.   !str      most recent command beginning with str
  1029.   !?str?    most recent command containing str
  1030.   !N        command N from the history list
  1031.   !-N       command N previous to the current one
  1032.   !!        previous command (same as !-1)
  1033.   !$        last word of previous command
  1034.   !*        all arguments of previous command
  1035.  
  1036. Modifiers (H can be str, ?str?, N or -N, n is a number or $):
  1037.  
  1038.   !H:$      last word of referenced command
  1039.   !H:n      n'th word of referenced command
  1040.   !H:n-m    n'th through m'th words of command
  1041.   !H:-n     word 0 (command name) through n of command
  1042.   !H:*      all arguments of command (same as !H:1-$)
  1043.   !H:n-     word n through next-to-last word
  1044.   !H:p      print but don't execute command
  1045.  
  1046.   !{R}str   append str to reference R (R is any form above)
  1047.  
  1048. It is not currently possible to combine :p with any of the
  1049. other modifiers.
  1050.  
  1051. Also see the variable $nonobang.
  1052. %%
  1053.  
  1054. %folders%
  1055.       folders
  1056.  
  1057. List the files in the directory described by the variable $folder.
  1058. These files are assumed to be folders of mail messages that can
  1059. be read in by the "folder" command (see "folder -?").
  1060.  
  1061. Also see the "ls" command.
  1062. %%
  1063.  
  1064. %stty%
  1065.       stty [options]
  1066.  
  1067. The "stty" command is equivalent to the UNIX command "stty".  All
  1068. options are the same.  Some settings will be temporarily changed
  1069. while mush is running, but will be restored when mush exits.
  1070. %%
  1071.