home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / NETWORK / MUSH7DOC.ZIP / CMD_HELP next >
Encoding:
Text File  |  1990-10-02  |  39.3 KB  |  1,107 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%
  337.     sort [-i] [-r|a|d|l|R|s|S]
  338.   
  339.   -i         ignore case in alphabetical sorts
  340.   -r         reverse order of next criteria
  341.   
  342.   -a         by author (alphabetical)
  343.   -d         according to date
  344.   -l         by length (size)
  345.   -R         by subject including Re: (alphabetical)
  346.   -s         by subject ignoring Re: (alphabetical)
  347.   -S         by status
  348.  
  349. Any combination of the options can be given.  Each comparison
  350. proceeds from left to right through the list of criteria,
  351. stopping when an ordering has been determined or no criteria
  352. remain.  The optional -r flag will reverse the order of the
  353. next comparison specified.  Example:
  354.  
  355.       sort -i -a -r -d
  356.  
  357. The above will sort by author first, ignoring case, and will
  358. sort by reverse date (most recent first) for each author.  The
  359. -r option can be given once for each criterion and applies
  360. only to the first criterion that follows it.  Giving -r twice
  361. in succession (-r -r) does NOT negate the reversal!  Whatever
  362. option follows the rightmost -r will have its sense reversed.
  363.  
  364. Unlike -r, the -i option is recognized at most once and applies
  365. to all alphabetical sorts in the list of criteria.
  366.  
  367. By default (no parameters), sort orders messages by status:
  368. New, unread messages are first, followed by preserved messages
  369. and finally the deleted messages are placed at the end.  If -r
  370. is the only flag given, the status order is reversed.
  371.  
  372. If the $date_received variable is set, sorting by date is
  373. done using the date you received the message.  Otherwise,
  374. messages are sorted by date sent by the original author.
  375.  
  376. See also the variable $sort.
  377. %%
  378.  
  379. %pick%
  380.       pick [+<num>] [-<num>] [-r msg_list] [-x] [-i] [-h hdr] [-f|s|t]
  381.     [-d [-][date]] [-ago [+|-] [n days] [n weeks] [n months]] [[-e] <pat>]
  382.  
  383. Search for patterns within messages.  Entire messages are
  384. searched for <pattern> unless -f, -h, -s, or -t is specified.
  385. Only one of -d, -f, -h, -s, -t and -ago can be specified; no
  386. pattern is used with -d and -ago; and -x may not be used in
  387. conjunction with +<num> and/or -<num>.
  388.  
  389.   +<num>        return only the first <num>ber messages matched
  390.   -<num>        return only the last <num>ber messages matched
  391.   -x            return all the messages which do NOT match
  392.   -e        remaining arguments are the <pat> (`e'xpression)
  393.   -f            match pattern in the "From:" field (author) only
  394.   -s            match pattern in the "Subject:" header only
  395.   -t            match pattern in the "To:" field only
  396.   -h hdr        match pattern in specified header field only
  397.   -i            ignore case of letters in when matching
  398.   -r msg_list   restrict the range of messages search to msg_list
  399.   -d            select messages sent on [+ after] [- before] date
  400.         A "date" is of the form:  [+-][month]/[date[/year]]
  401.         Omitted fields default to today's values.  Examples:
  402.           pick -d 4/20     messages on Apr 20, this year
  403.           pick -d -/2/85   on or before the 2nd, this month, 1985
  404.           pick -d +5/4     on or after May 4, this year
  405.           pick -d /        finds today's messages only
  406.         At least one `/' char must be used in a date.  There is
  407.     no strong date checking; 2/30 would be considered valid.
  408.   -ago          select messages relative to the current date
  409.     Date formats for "ago" are more verbose than for -d; see
  410.     the manual page for details.
  411.  
  412. Examples:
  413.     Find the first 5 messages with the subject "Telephone Message":
  414.     pick +5 -s Telephone Message
  415.     Find the first 2 messages of the last 4 that are to "mush-users":
  416.     pick -4 +2 -t mush-users
  417.     Find those among messages 1 to 10 that are 2 months or more old:
  418.     pick -r 1-10 -ago -2m
  419.     Find messages that are 1 week old or newer:
  420.     pick -ago +1w
  421.     Find messages that contain "-request" in the Resent-From field:
  422.     pick -h resent-from -e -request
  423.  
  424. A description of the pick operation will be printed before the search
  425. is performed, unless the value of the variable $quiet contains the
  426. field "pick", or pick is piped to another mush command.
  427.  
  428. If the "ukdate" flag is set, the month and day are interpreted in reverse
  429. order;  i.e. 1/2/90 means 1 Feb 1990, not 2 Jan 1990.
  430. %%
  431.  
  432. %alias%
  433.       alias [name [namelist]]
  434.  
  435. Options for alias:
  436.  alias                       print all namelists
  437.  alias name                  print namelist associated with name
  438.  alias name namelist         set "name" to the value of namelist
  439.  unalias namelist            unalias names in namelist
  440.  
  441. A "namelist" consists of one or more addresses.  An address may
  442. be a name already set to another list, a valid user, a file or
  443. a program.  Filenames must be full pathnames, i.e., they must
  444. begin with a '/' (or with a ~, which expands to some home dir).
  445. A "program" must start with a pipe symbol and be encased in
  446. quotes:
  447.  
  448.     "|program_name"
  449.  
  450. The command "expand" will print addresses (including sublists)
  451. associated with the given alias.
  452.  
  453. See also the variable $no_expand.
  454. %%
  455.  
  456. %from%
  457.       from [+|-] [msg-list]
  458.  
  459. With no parameters, "from" will print the current message's
  460. header line.  If given a message list, "from" will print the
  461. headers of the listed messages.
  462.  
  463. The special parameters `-' and `+' can be given to move the
  464. current message pointer to the previous or next message
  465. respectively, while also printing that message's header.
  466.  
  467. If a message list was given in addition to `-' or `+', then
  468. the current message pointer will be set to the first or last
  469. message, respectively, in the message list given.
  470.  
  471. Examples:
  472.  
  473.     from - 10-30 {16}
  474. will print the headers of messages 10 through 30 except for
  475. message 16 and set the current message pointer to 10.
  476.  
  477.     pick -f Dan | from +
  478. will print the headers of all messages that contain "Dan" in the
  479. author's name and set the current message pointer to the last
  480. one of that kind in the list.
  481.  
  482.     from +
  483. will print the header of the message after the current message
  484. and increment the current message pointer to that message.
  485.  
  486. See also the "headers" command and "help hdr_format".
  487. %%
  488.  
  489. %my_hdr%
  490.       my_hdr [header[: string]]
  491.  
  492. This command is used to set, unset or view your personalized
  493. message headers.  These headers are included in all your
  494. outgoing mail.
  495.  
  496. Options for my_hdr:
  497.   my_hdr            show all headers
  498.   my_hdr header            show value of header
  499.   my_hdr header: string        set header to string
  500.   un_hdr header            unset header
  501.  
  502. Note that there is no space between the header name and the
  503. colon in the third form of the command.
  504. %%
  505.  
  506. %fkey%
  507.       fkey [<sequence> [command]]
  508.       unfkey <sequence>
  509.  
  510. This command is used to make function key settings in Suntools
  511. (graphics) mode.  When run as a tool (-t on command line),
  512. choose the Options item, and the "function key" menu option.
  513.  
  514. The unfkey command removes the setting for a given string.
  515. %%
  516.  
  517. %cmd%
  518.       cmd [name [value]]
  519.  
  520. This function is used to establish command aliases; cmd's are
  521. just like aliases in the C-shell.  Options are:
  522.   cmd                       view all commands
  523.   cmd command               show value of command
  524.   cmd command value         set command to value
  525.   uncmd command             unset command
  526.  
  527. The value must be quoted if it is to contain command separators
  528. such as `;' or `|'.
  529.  
  530. If you want to reference history commands within a cmd,
  531. escape the ! with a backslash.  For example:
  532.  
  533.     cmd r 'replysender \!* ; delete -t'
  534.  
  535. will cmd "r" to reply using whatever parameters you have given on
  536. the command line and then delete that message and print the next
  537. message (-t parameter to "delete").
  538. %%
  539.  
  540. %headers%
  541.       headers [+|-|N] [[-H]:c]
  542.   +    print the next screenful (or use the 'z' command).
  543.   -    print the previous screenful (or use 'z-' ).
  544.   N    print a screenful starting at message number N.
  545.   -H:c  where `c' is one of
  546.      a  all messages (mostly for the mush startup option -H:c)
  547.      d  deleted messages
  548.      n  new messages
  549.      o  old messages
  550.      p  preserved messages
  551.      r  replied-to messages
  552.      s  saved messages
  553.      u  unread messages
  554.  
  555. The "headers" command prints out a screenful of headers.
  556. Deleted messages are not normally shown; set "show_deleted" to
  557. include deleted messages.
  558.  
  559. The command ":c" is equivalent to "headers -H:c".  The -H can be
  560. omitted, i.e., "headers :c" will also work.
  561.  
  562. See also "help hdr_format".
  563. %%
  564.  
  565. %folder%
  566.       folder [-N] [-n] [-r] [%[user]|#|&|file]
  567.   
  568.   -N       do not display the list of headers
  569.   -n       do not update the current folder before changing
  570.   -r       read only mode (cannot write changes to new folder)
  571.   %[user]  change to /usr/spool/mail/[user] (you by default)
  572.   #        change to folder accessed previous to current folder
  573.   &        change to "mbox" -- default is $mbox or ~/mbox
  574.  
  575. The "folder" command changes the current folder; with no parameters,
  576. it prints the name of the current folder.  For compatibility with
  577. older versions, the single character `!' is equivalent to -n.
  578.   
  579. "Folder" treats the characters `+' and `~' as metacharacters when
  580. they are the first character of a file name.  `~' is expanded to the
  581. name of the user's home directory, or to another user's home if it
  582. is given as "~username" (no `/' between the `~' and the name).  `+'
  583. is expanded to the user's folder directory ("~/Mail" or the value of
  584. $folder); no `/' is required between `+' and the file name, so both
  585. "+file" and "+/file" refer to the same file.
  586.  
  587. The "update" command updates the current folder.  In this case, only
  588. the -N and -r options are recognized; "update -r" changes the current
  589. folder to read only mode AFTER updating it.
  590.   
  591. See also the variable $folder.
  592. %%
  593.  
  594. %quit%
  595.       quit/exit
  596.  
  597. These commands end a mush session.  "quit" will update your
  598. mailbox; if new mail has come in, you will be told so and given
  599. an option whether to really quit or not.  "exit" will leave mush
  600. neither updating your mailbox nor checking for new mail.
  601. %%
  602.  
  603. %ls%
  604.       ls [options]
  605.  
  606. The "ls" command is exactly like the UNIX command "ls".  All
  607. parameters are the same.  The "folders" command is equivalent
  608. to doing "ls -FR $folder" from the Mush prompt.
  609. %%
  610.  
  611. %shell%
  612.       sh [command]
  613.  
  614. If a "command" is given, that UNIX command will be executed
  615. under the Bourne shell.  If no command is specified, then an
  616. interactive shell will be started. The environment variable
  617. SHELL or the local mail shell variable $shell describes the
  618. shell to invoke.  If none is set, then the default shell is
  619. defined by the system administrator (currently set to csh).
  620.  
  621. Users on systems with job control will probably have little
  622. use for the sh command.
  623. %%
  624.  
  625. %stop%
  626.       stop
  627.  
  628. The stop command sends a stop signal to the mail shell.  It is
  629. equivalent to your tty job-control stop character (often ^Z).
  630. Since the mush shell never needs to be exited, the command 'q'
  631. may be "cmd"ed to "stop;await" and csh users may have
  632.     alias mail %mush
  633. to bring mush into the foreground rather than having to invoke
  634. it again.  New mail will be read into the shell automatically
  635. and much time and energy is saved.
  636. %%
  637.  
  638. %curses%
  639.       curses
  640.  
  641. The curses-based interface for Mush does not require a graphics
  642. display, but does requires a terminal which can handle upline
  643. cursor movement capabilities.  All commands are one or two
  644. keystroke commands and are executed as soon as the key is typed.
  645.  
  646. For a list of current key-to-command bindings, use the "bind"
  647. command (defaults to 'b' in curses mode).
  648.  
  649. See also the variable $curses_help.
  650. %%
  651.  
  652. %bind%
  653.       bind [<sequence> <curses-command> [<parameters>]]
  654.       unbind <sequence>
  655.  
  656. Binding is done for the curses interface only.  It allows the
  657. user to bind keystrokes or key sequences to curses-interface
  658. commands.  You cannot bind keystrokes to regular mush commands
  659. using bind.
  660.  
  661. A bound key-sequence (input by the user) will be converted into
  662. the curses command it is bound to.  For a list of all curses
  663. commands, issue the "bind" command and follow the instructions
  664. to get a list.  Currently, parameters are ignored for all curses
  665. commands except the special command "macro".
  666.  
  667. When specifying sequences, you may enter almost anything at the
  668. keyboard that you want to type.  This includes most control
  669. characters.  A special syntax is provided to specify control
  670. characters if you wish to set up default key bindings in your
  671. initialization file without using real control characters.
  672.  
  673. To bind keystrokes that are control characters in the
  674. initialization file, you must use the notation "\CX" where "X"
  675. is an upper-case letter representing the control key you want to
  676. use. "\CN" would be control-N; "\n" is carriage return.  You may
  677. not bind keyboard generated signals; for most users, those key
  678. sequences are control-C and control-\.  For users with job
  679. control, the suspend characters (usually control-Z and
  680. control-Y) are also ignored.
  681.  
  682. To specify the escape key, use "\E"; "\C[" will not work.
  683.  
  684. Trying to bind a key sequence which prefixes another sequence is
  685. an error and the user is warned that the longer binding will not
  686. work.  The binding will take place, however, because it is
  687. possible to unbind the shorter sequence, thus validating the
  688. longer sequence.
  689.  
  690. The special curses command "macro" allows a string to be
  691. executed just as if the user typed it directly.  Issue the
  692. "bind-macro" command for more details.
  693.  
  694. Bindings are removed with the "unbind" command.
  695. %%
  696.  
  697. %msg_flags%
  698.       flags [[+|-] [flag-bits]] [msg-list]
  699.  
  700. Any sensible combination of these flag-bits may be used:
  701.   D    deleted
  702.   f    forwarded
  703.   N    new
  704.   O    old
  705.   P    preserved
  706.   p    printed
  707.   R    read
  708.   r    replied-to
  709.   S    saved
  710.   U    unread
  711.  
  712. This command displays the status of messages by default.
  713. If a msg-list is specified, it will tell which bits of the
  714. message are set.  If any (one or more) of the bits are
  715. given and no + or - modifier is specified, then the status
  716. of each message in the list will be set to that status
  717. absolutely (other status flags are lost).  However, if a +
  718. or - is specified, then the status is modified for that bit
  719. to on (+) or off (-).
  720.  
  721. If no list is given, then the list of messages is taken
  722. from a pipe (if piped) or the current message is used.
  723. %%
  724.  
  725. %setenv%
  726.       setenv VARIABLE [value]
  727.  
  728. Variable names may be any string, but traditionally environment
  729. variables are all upper case.  If no "value" is specified, then
  730. the variable name will be set to an empty string.  If the value
  731. contains spaces, you should enclose the string in quotation
  732. marks.  Use printenv to print a list of all your environment
  733. variables.
  734. %%
  735.  
  736. %unsetenv%
  737.       unsetenv VARIABLE
  738.  
  739. You must specify one and only one variable to unset in your
  740. environment variable settings.  Use printenv to print a list of
  741. all your environment variables.
  742. %%
  743.  
  744. %printenv%
  745.       printenv [VARIABLE]
  746.  
  747. Display the entire current environment, or the value of the
  748. specified environment variable.
  749.  
  750. Also see "setenv" and "unsetenv".
  751. %%
  752.  
  753. %edit_msg%
  754.       edit [msg_list]
  755.  
  756. The "edit" command lets you edit messages in your folder.  The
  757. editor used is determined by the variable $editor, the environment
  758. variable EDITOR, the variable $visual and the environment variable
  759. VISUAL in that order.  If none of those variables are set, the
  760. default visual editor will be used.  The "v" command is the same
  761. as "edit" but will test only $visual and VISUAL.
  762.  
  763. When editing messages, be careful not to remove certain message
  764. headers such as Date:, From:, or any others that look important.
  765. If you remove or change something you shouldn't have, you will
  766. be notified and the temporary file used to edit the message will
  767. not be removed.
  768. %%
  769.  
  770. %bind-macro%
  771.       bind-macro [<sequence> [<expansion>]]
  772.  
  773. The "bind-macro" command allows you to set macros in curses
  774. mode, so that one keystroke (or a few) will act as though you
  775. had typed a longer sequence.  Using "bind-macro" is equivalent
  776. to specifying the "macro" special command as a parameter to
  777. the "bind" command.
  778.  
  779. Given no parameters, "bind-macro" will list all current curses
  780. mode macros.  Given only a <sequence>, it will show the current
  781. binding for that sequence.  Given both a <sequence> and an
  782. <expansion>, it will create a macro such that, when the
  783. <sequence> is typed in curses mode, the effect will be the same
  784. as if the <expansion> had been typed instead.
  785.  
  786. The same format for control characters that is used for the
  787. "bind" command may be used in both the <sequence> and the
  788. <expansion>, i.e.,
  789.     \Cx     control-x (where x is a capital letter)
  790.     \E      the escape character (\C[ does NOT work!)
  791.     \n      a newline (other C-style escapes also work)
  792.  
  793. Example:
  794.     bind-macro F [folder]+record\n
  795.  
  796. If you are in curses mode and hit the F key, then the curses
  797. mode command "folder" will execute and +record (followed by
  798. a carriage return) will be entered as if you typed it.
  799.  
  800. Macros are removed with the "unbind" command, see "bind -?".
  801.  
  802. Also see the "map" and "map!" commands.
  803. %%
  804.  
  805. %map%
  806.       map [<sequence> [<expansion>]]
  807.       unmap <sequence>
  808.  
  809. The "map" command allows you to use one keystroke (or a few) and
  810. have it act as though you had typed a longer sequence.
  811.  
  812. Given no parameters, "map" will list all current line mode
  813. macros.  Given only a <sequence>, it will show the current
  814. binding for that sequence.  Given both a <sequence> and an
  815. <expansion>, it will create a macro such that, when the
  816. <sequence> is typed in line mode, the effect will be the same
  817. as if the <expansion> had been typed instead.
  818.  
  819. The same format for control characters that is used for the
  820. "bind" command may be used in both the <sequence> and the
  821. <expansion>, i.e.,
  822.     \Cx     control-x (where x is a capital letter)
  823.     \E      the escape character (\C[ does NOT work!)
  824.     \n      a newline (other C-style escapes also work)
  825.  
  826. Example:
  827.     map & print\n
  828.  
  829. If you are not in curses mode and hit the & key, then it will
  830. be as if you typed the word "print" and hit carriage return.
  831.  
  832. To type a character without having the mapping expanded, precede
  833. the character with a backslash (\).
  834.  
  835. Mappings are removed with the "unmap" command.
  836.  
  837. Also see the "map!" and "bind" commands.
  838. %%
  839.  
  840. %map!%
  841.       map! [<sequence> [<expansion>]]
  842.       unmap! <sequence>
  843.  
  844. The "map!" command allows you to set macros in message
  845. composition mode, so that one keystroke (or a few) will act
  846. as though you had typed a longer sequence.  map!'s take
  847. effect regardless of whether you started the letter from
  848. curses mode or line mode.
  849.  
  850. Given no parameters, "map!" will list all composition mode
  851. macros.  Given only a <sequence>, it will show the current
  852. binding for that sequence.  Given both a <sequence> and an
  853. <expansion>, it will create a macro such that, when the
  854. <sequence> is typed in message composition mode, the effect will
  855. be the same as if the <expansion> had been typed instead.
  856.  
  857. The same format for control characters that is used for the
  858. "bind" command may be used in both the <sequence> and the
  859. <expansion>, i.e.,
  860.     \Cx     control-x (where x is a capital letter)
  861.     \E      the escape character (\C[ does NOT work!)
  862.     \n      a newline (other C-style escapes also work)
  863.  
  864. Example:
  865.     map! ! <BANG>
  866.  
  867. If you are typing in a letter regardless of which interface you
  868. use and you hit the ! key, then it would be as if you typed the
  869. keys "<BANG>".
  870.  
  871. To type a character without having the mapping expanded, precede
  872. the character with a backslash (\).
  873.  
  874. Mappings are removed with the "unmap!" command.
  875.  
  876. Also see the "bind" and "map" commands.
  877. %%
  878.  
  879. %eval%
  880.       eval [-h|-p] args ...
  881.  
  882. This command causes its arguments to be re-parsed and then
  883. executed as a mush command.  Example:
  884.  
  885.     set initprompt='"$hostname:$cwd "'
  886.     eval set prompt=$initprompt
  887.  
  888. If the -h flag is given, then eval looks for formatting parameters
  889. as defined for the variable $hdr_format, and expands the formats
  890. for the "current" message before executing the command.  Example:
  891.  
  892.     eval -h pick -f %f
  893.  
  894. will find all messages from the same author as the current message.
  895.  
  896. If the -p flag is given, then eval expands formatting parameters as
  897. as defined for the variable $prompt.  The -h and -p flags may not be
  898. used together in the same eval.
  899. %%
  900.  
  901. %pipe_msg%
  902.       pipe [-p pattern] [msg-list] [unix-command] [cmd-args]
  903.  
  904. This command is used to send a message to a unix command.  The
  905. command will take its input from the message(s) passed to the pipe
  906. command.  By default, the entire message (including headers) is
  907. sent.  Ignored headers (see "ignore -?" and "set ?show_hdrs") can
  908. be suppressed by setting the variable $alwaysignore.
  909.  
  910. You can pipe (|) messages to this command rather than give a
  911. msg-list, but if no msg-list is given and there is no pipe, the
  912. current message is used.  The unix-command is executed via "sh",
  913. so csh aliases may not be used.
  914.  
  915. If invoked with a capital letter (Pipe), only the bodies of the
  916. messages will be fed to the unix-command -- all headers will be
  917. omitted.
  918.  
  919. A pattern can be specified to indicate which line should start
  920. the lines that are sent to the unix command.  The pattern must
  921. match literally (no regular-expressions) at the beginning of a
  922. line.  Once the pattern is found, that line and all succeeding
  923. lines are sent to the unix command.
  924.  
  925. If the unix-command is omitted, then /bin/sh is used and the 
  926. pattern searched for is "#!".  Therefore, "pipe" with no arguments
  927. can be used to treat a message as a shell script.
  928.  
  929. Examples:
  930.     pipe patch         -- send the current message to "patch"
  931.     pipe -p %! lpr     -- send the message to a postscript printer
  932.     pipe 2 7 more      -- send messages 2 and 7 through "more"
  933.     1 | Pipe nroff     -- send the body of message 1 to "nroff"
  934. %%
  935.  
  936. %merge%
  937.       merge [-N] folder-name
  938.  
  939. The contents of the specified folder are read into the current
  940. folder.  If -N is not specified, a header summary is printed
  941. for each message read (see "headers -?").
  942.  
  943. A list of all the merged messages is returned for use in pipes.
  944. %%
  945.  
  946. %echo%
  947.     echo [-n] [-h | -p] args
  948.  
  949. Echo simply echoes the parameters to the command back to the user.
  950.  
  951. If the -n flag is given, then no newline is appended.
  952. If the -h flag is given, then echo looks for formatting parameters
  953. as if the "from" command were given on the "current" message.
  954. If the -p flag is given, then echo looks for formatting parameters
  955. as if your prompt were changed temporarily.
  956.  
  957. Examples:
  958.     echo -h This message is from %a and is dated %d
  959. might produce:
  960.     This message is from island!argv and is dated Dec 14, 1988.
  961.  
  962.     echo -p There are %n new messages to read in %f.
  963. might produce:
  964.     There are 5 new messages to read in /usr/spool/mail/argv.
  965.  
  966. Note that -h and -p cannot be specified together.
  967. %%
  968.  
  969. %undigest%
  970.     undigest [-m] [-p pattern] [msg_list] [filename]
  971.  
  972. A "digest" is a mail message which is a collection of other mail messages
  973. mailed to a "moderator" by other users.  The moderator compiles all the
  974. messages into a folder and sends the result to all the subscribers of the
  975. mailing list.  The undigest command disassembles the entries into the set
  976. of messages which comprises the digest.
  977.  
  978. The -m option will merge these messages into the current folder.  Otherwise,
  979. if a filename is specified, a new folder is created and the user can change
  980. folders to read the messages separately.
  981.  
  982. The -p option specifies an alternate pattern to use as the digest article
  983. separator.  The pattern must match literally at the beginning of a line.
  984. The default pattern is "--------" (eight hyphens).
  985.  
  986. If a message list is specified, each digest is disassembled to the same
  987. filename (if given).  If no filename is given and the user did not request
  988. a merge, then a folder is created based on the subject of the digest.
  989. %%
  990.  
  991. %await%
  992.     await [-T delay]
  993.  
  994. Instructs the shell to wait for new mail to arrive.  New mail is checked
  995. every 30 seconds by default; a different delay can be specified by using
  996. the -T option.
  997.  
  998. If this command is used in a pipe, its output is its input plus the list
  999. of new messages that have arrived.  For example, to show the headers of
  1000. all new messages, and set the current message to the first new message:
  1001.  
  1002.     await | from -
  1003.  
  1004. The await command terminates only when new mail arrives or a keyboard
  1005. interrupt is generated.
  1006. %%
  1007.  
  1008. %cd%
  1009.       cd [directory]
  1010.  
  1011. Change the current working directory to the specified directory,
  1012. or to the user's home directory if none was given.
  1013.  
  1014. If the variable $cdpath is set to a list of directory names,
  1015. and the argument directory is not an absolute path, mush will
  1016. search the cdpath directories in the order given for the new
  1017. directory and change to the first one found.  NOTE:  The current
  1018. directory "." MUST BE INCLUDED in the cdpath or it will not be
  1019. searched!  This differs from csh, which prefers "." be left out.
  1020. %%
  1021.  
  1022. %pwd%
  1023.       pwd
  1024.  
  1025. Prints the current working directory.  The variable $cwd also
  1026. holds the current working directory unless reset by the user.
  1027. %%
  1028.  
  1029. %delete%
  1030.       delete/undelete [msg-list]
  1031.  
  1032. The "delete" command marks the listed messages as deleted.  If
  1033. no message list is given, the current message is deleted.
  1034.  
  1035. Deleted messages are not shown in the header summary display
  1036. except in curses mode and when the variable $show_deleted is set.
  1037. Deleted messages are ignored by the "pipe" command and by the
  1038. commands that display messages (see "print -?"), but most other
  1039. commands include all messages whether deleted or not.
  1040.  
  1041. Deleted messages are lost forever when the folder is updated (by
  1042. the "update" command, by changing folders without the "!" flag,
  1043. or by exiting with "quit").  Messages can be recovered by the
  1044. "undelete" command at any time BEFORE the folder is updated.
  1045.  
  1046. See also the variable $show_deleted.
  1047. %%
  1048.  
  1049. %history%
  1050.       history [-h] [-r] [number]
  1051.  
  1052. Display the command history that mush has recorded, as in csh.
  1053. Option -h suppresses the history numbers, and option -r shows
  1054. the history in reverse order (most recent first).  If a number
  1055. is given, that many commands of history are displayed.
  1056.  
  1057. The number of commands that mush records is controlled by the
  1058. variable $history.  If $history is not set, mush will save only
  1059. the previous command (equivalent to history=1).
  1060.  
  1061. The basic forms of history reference are (N is a number and
  1062. str is any string):
  1063.  
  1064.   !str      most recent command beginning with str
  1065.   !?str?    most recent command containing str
  1066.   !N        command N from the history list
  1067.   !-N       command N previous to the current one
  1068.   !!        previous command (same as !-1)
  1069.   !$        last word of previous command
  1070.   !*        all arguments of previous command
  1071.  
  1072. Modifiers (H can be str, ?str?, N or -N, n is a number or $):
  1073.  
  1074.   !H:$      last word of referenced command
  1075.   !H:n      n'th word of referenced command
  1076.   !H:n-m    n'th through m'th words of command
  1077.   !H:-n     word 0 (command name) through n of command
  1078.   !H:*      all arguments of command (same as !H:1-$)
  1079.   !H:n-     word n through next-to-last word
  1080.   !H:p      print but don't execute command
  1081.  
  1082.   !{R}str   append str to reference R (R is any form above)
  1083.  
  1084. It is not currently possible to combine :p with any of the
  1085. other modifiers.
  1086.  
  1087. Also see the variable $nonobang.
  1088. %%
  1089.  
  1090. %folders%
  1091.       folders
  1092.  
  1093. List the files in the directory described by the variable $folder.
  1094. These files are assumed to be folders of mail messages that can
  1095. be read in by the "folder" command (see "folder -?").
  1096.  
  1097. Also see the "ls" command.
  1098. %%
  1099.  
  1100. %stty%
  1101.       stty [options]
  1102.  
  1103. The "stty" command is equivalent to the UNIX command "stty".  All
  1104. options are the same.  Some settings will be temporarily changed
  1105. while mush is running, but will be restored when mush exits.
  1106. %%
  1107.