home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / mush6.0 / part12 / mush.1.b
Encoding:
Text File  |  1988-04-12  |  37.2 KB  |  1,201 lines

  1. See the COMMANDS heading below for more detail.
  2. .PP
  3. This shell-like quality is for the convenience of the user and is not
  4. intended to replace the functionality of
  5. .IR sh ,
  6. .IR csh ,
  7. or any other command interpreter.
  8. .SH "CURSES INTERFACE"
  9. The curses interface utilizes the curses routines intrinsic to most
  10. UNIX systems these days.
  11. This interface is screen oriented rather
  12. than line oriented and allows the user to access commands and messages
  13. more quickly at the cost of history, piping, and a few commands.
  14. .PP
  15. Many users who prefer the curses interface might want to always start
  16. all their mail sessions in the curses interface.
  17. Putting the curses
  18. command in your initialization file is a no-no, so you can alias your
  19. login shell mail command to include the -C option.
  20. If you use the Bourne Shell, you're going to have to type it out all the time.
  21. Mush will to attempt to know not to run a shell if you're just sending mail to
  22. someone, so the
  23. .I csh
  24. command line sequences:
  25. .sp
  26. .ti +2
  27. % alias mail 'mush -C'
  28. .ti +2
  29. % mail fred
  30. .sp
  31. will mail to fred and not enter the shell.
  32. However, if you just said, "mail"
  33. with no arguments, you'll enter the shell in curses mode if you have mail.
  34. If you don't, you'll be told so, and the shell will not start.
  35. If you want to enter curses mode even if
  36. you don't have mail, use the \-S option on the command line.
  37. .PP
  38. In curses mode, the user's terminal has it's \*Qecho\*U turned off so commands
  39. that are issued are not echoed on the screen.
  40. Certain commands cause the mode
  41. to return to normal for typing purposes (sending mail, for example).
  42. In normal operation, the screen will display the current set of message
  43. headers, the current message number is in the top left corner, the
  44. mail status on the top line, and the cursor will be placed on the current
  45. message.
  46. The number of message headers displayed is set by the variable
  47. .BR screen .
  48. If the user does not have that variable set, the baud rate is checked and
  49. the size of the screen is set according to optimal refresh time.
  50. Usually, 300 baud gives 7 lines, 1200 gives 14, 2400 gives 22 lines, and all
  51. higher baud rates give the size of the screen, whatever that may be.
  52. Note that the top line is reserved for \*Qstatus\*U and the bottom line is
  53. for user interaction should it be required.
  54. .PP
  55. The user may now type commands via key sequences which are not echoed
  56. to the screen.
  57. Thus, function keys may be bound to \*Qcommands\*U by using the 
  58. .B bind
  59. command.
  60. A list of key-to-command bindings can be found at runtime by typing `?'
  61. in curses mode or by using the
  62. .B bind
  63. command in line mode.
  64. .PP
  65. The commands to which you can map sequences are intended to be as self
  66. explanatory as possible, but admittedly, it's easier to figure out via
  67. trial and error than to try to wade through this documentation.
  68. A list of the legal curses commands can be obtained when executing the
  69. bind command.
  70. Regular tty line-mode commands are not issued from
  71. the curses interface; only special curses mode commands are understood.
  72. The current list of valid curses commands is:
  73. .sp
  74. .ta 1.5i 3i 4.5i
  75. .in +4
  76. .nf
  77. alias    back msg    bind    bottom page
  78. chdir    copy    copy list    delete
  79. delete list    display    display next    exit
  80. exit!    first msg    folder    goto msg
  81. ignore    last msg    line mode    lpr
  82. mail    mail flags    my hdrs    next msg
  83. preserve    quit    quit!    redraw
  84. reply    reply all    reverse video    save
  85. save list    saveopts    screen back    screen next
  86. search cont    search down    search up    shell escape
  87. show hdr    sort    sort reverse    source
  88. top    top page    unbind    undelete
  89. undelete list    update    variable    version
  90. write    write list    help
  91. .fi
  92. .in -4
  93. .sp
  94. .PP
  95. The following is a list of default key-command bindings.
  96. If you specify bind commands in your initialization file that conflict with
  97. these defaults, your settings will override the defaults.
  98. The default settings given here
  99. use the ^-character method to indicate control characters.
  100. Thus, `^X' would mean control-X even
  101. though you'd have to type \*Q\\CX\*U to set
  102. the binding and actually use the control key and the `X' key simultaneously
  103. to really
  104. .I do
  105. a Control-X.
  106. This is mostly because nroff makes printing the backslash
  107. character so amazingly difficult.
  108. .TP
  109. \&., t, p, T=top, n=next
  110. Display (type/print) message.
  111. Top will display the first
  112. .B crt
  113. lines of a message.
  114. Next will print the next message.
  115. If the current message is deleted, the next undeleted message is found.
  116. You might notice this is different than the line mode, which will return
  117. an error message that the current message is marked as deleted.
  118. .TP
  119. +, j, J, RETURN
  120. Go to next message.
  121. .TP
  122. -, k, K, ^K
  123. Go to previous message.
  124. .TP
  125. ^, $
  126. Go to first/last message.
  127. .TP
  128. {, }
  129. Go to top/bottom of screen.
  130. .TP
  131. a
  132. Set aliases.
  133. .TP
  134. b, B
  135. Set/unset bindings.
  136. .TP
  137. d, D, u, U
  138. Delete/undelete messages (capitals prompt for message list).
  139. .TP
  140. f
  141. Change folder.
  142. If current folder has changed, verification for update will be requested.
  143. .TP
  144. g, 0-9
  145. Go directly to a specified message.
  146. When the \*Qgoto\*U command
  147. is selected, a prompt at the bottom of the window prompts for a
  148. .BR "message list" .
  149. Anything which describes a message list may be used.
  150. Since
  151. .I Mush
  152. commands return message lists, a legal
  153. .I Mush
  154. command enclosed in backquotes may be used to go to a particular message.
  155. The new current message pointer will point to the next
  156. message, returned by the command, that is below the old current message.
  157. An example:
  158. .sp
  159. .ti +2
  160. goto msg: `pick -f argv`
  161. .sp
  162. This will cause the current message to move to the first message
  163. in the current folder from the user \*Qargv\*U that comes after the
  164. message pointed to when the \*Qgoto\*U was issued.
  165. So, if messages 1 and 5
  166. are from the user \*Qargv\*U and the current message the user was on
  167. was message 3, then the new current message would be message 5, since it
  168. is the first message found after message 3 that is from \*Qargv\*U.
  169. .TP
  170. h
  171. Set personal headers.
  172. .TP
  173. H
  174. Print header information for the current message.
  175. This only works when the user is provided with the \*Q...continue...\*U
  176. prompt and he wishes to view the current message header instead of
  177. redrawing the entire screen.
  178. .TP
  179. i
  180. Set ignored headers.
  181. .TP
  182. m, M
  183. Send mail (capital prompts for mail flags).
  184. .TP
  185. o, O
  186. Order messages (sort; capital reverses order).
  187. A prompt requests the sort constraints.
  188. .TP
  189. q, Q, x, X
  190. Quit/exit.
  191. \&`q' will test to see if the current folder has been updated and prompt
  192. the user to verify updating.
  193. \&`x' does not update mail, but quits the program.
  194. \&`Q' does not prompt for update verification; if changes were
  195. made, updating is automatic.
  196. \&`Q' (quit!) and `X' (exit!) will work even when typed at the
  197. \*Q...continue...\*U prompt, whereas `q' and `x' will not.
  198. .TP
  199. r, R
  200. Reply/reply all.
  201. .TP
  202. s, S, c, C, w, W
  203. Save, copy, or write messages (capitals prompt for message lists).
  204. .TP
  205. v
  206. Set regular variables (as opposed to environment variables).
  207. .TP
  208. V
  209. Print version number.
  210. .TP
  211. z, Z
  212. Print next/previous screenful of message headers.
  213. .TP
  214. ^L
  215. Redraw the screen.
  216. .TP
  217. ^P
  218. Preserve current message (toggle).
  219. .TP
  220. ^U
  221. Update folder.
  222. A prompt will request confirmation.
  223. .TP
  224. ^R
  225. Toggle reverse video mode (current message is in reverse video).
  226. .TP
  227. |
  228. Send message to printer
  229. .TP
  230. !
  231. Shell Escape.
  232. Prompts for command; RETURN invokes a shell.
  233. .TP
  234. %
  235. change directory.
  236. .TP
  237. (, )
  238. Source/saveopts.
  239. Prompts for file name.
  240. .TP
  241. /, ^/, ^N
  242. Forward, backward, continue search for patterns.
  243. Entire messages are not searched for here.
  244. Only the text available on the screen is searched for.
  245. Note that some terminals use `^_' (control-underscore) for `^/',
  246. so you may wish to re-bind this key.
  247. .TP
  248. :[cmd]
  249. Enter line mode for one command.
  250. If no command is given, curses mode
  251. is exited and the session continues in line mode.
  252. .PP
  253. When setting new key sequences to be bound to commands, the user may
  254. use control keys and the ESCAPE character for extended commands.
  255. Exceptions are control-C, control-\\, and possibly other control characters
  256. depending on your system's configuration or your current tty interrupt
  257. character settings.
  258. The spacebar may not be bound using the interface
  259. supplied by the curses mode `b'
  260. .RB ( bind )
  261. command since spaces are stripped before processing.
  262. To bind the spacebar to a function, use the line mode command
  263. .sp
  264. .ti +2
  265. bind " " display next
  266. .sp
  267. This example shows how you can bind the spacebar to display the next message.
  268. This command may be given in the initialization file or on a
  269. .I Mush
  270. command line.
  271. .PP
  272. When assigning key sequences to commands, the user enters the
  273. .B bind
  274. command and prompting is done.
  275. If the
  276. user wishes to have control characters or the escape character in a key
  277. sequence while still using ascii format, the special notation for control
  278. characters is provided.
  279. This sequence is used primarily for the use of
  280. binding control character sequences in the initialization file.
  281. This format
  282. is also used to display the current key-command mappings by the program.
  283. .PP
  284. To specify control characters in ascii format for the bind command, the
  285. sequence \*Q\\Cc\*U is used where `c' is the
  286. character which the control key will translate to and must be in upper case.
  287. The sequence \*Q\\CP\*U would map to control-P.
  288. If the user wishes to indicate the RETURN key, this is specified
  289. with the string \*Q\\n\*U and
  290. the tab key is specified by the string \*Q\\t\*U.
  291. As a more complex example, on a Wyse-50 terminal, the 8th function key
  292. outputs the three characters: control-A, H, line-feed.
  293. To map this function key to a command, the
  294. user would have to enter the sequence \*Q\\CAH\\n\*U as the key sequence,
  295. then follow up with a valid curses command.
  296. From then on, if the user presses that function key,
  297. then the command mapped to it will be executed.
  298. .PP
  299. The ESCAPE key is signified by the sequence, \*Q\\E\*U.
  300. On a Sun-3 workstation,
  301. the R1 key outputs the character sequence: ESC, [, 2, 0, 8, z.
  302. The corresponding
  303. .B bind
  304. key sequence would be \*Q\\E[208z\*U.
  305. Restrictions are that key sequences may not contain the space character
  306. unless bound in line mode, and can never begin with a digit.
  307. .PP
  308. Whenever a command is entered, other than `^L'
  309. .RB ( redraw ),
  310. that causes the screen to scroll or be refreshed in any way,
  311. .I Mush
  312. is left in the
  313. .I continue
  314. mode.
  315. When in this mode, the user is given his line-mode prompt followed
  316. by \*Q...continue...\*U indicating that he may issue a new command or
  317. return to the top level where the current message headers are displayed
  318. on the screen.
  319. Remember that this is still the curses mode, but much time
  320. is saved by avoiding redrawing the screen after each command.
  321. The user may move up and down messages using the appropriate commands
  322. (j/k by default) or anything else the curses mode allows.
  323. Only the spacebar and the exit and quit commands will return
  324. to the top level.
  325. Because the exit and quit commands are used to do this, there are 2 additional
  326. ways to \*Qquit\*U from curses mode and return to the login shell.
  327. The \*Qexit\*U and \*Qquit\*U commands will quit from the top level, but
  328. the commands
  329. .B exit!
  330. and 
  331. .B quit!
  332. are used to exit from the \*Qcontinue\*U level in the curses interface as well
  333. as from the top level.
  334. .PP
  335. Note that the best way to understand the curses interface is to just use it.
  336. In line mode, the command \*Qcurses\*U puts you into curses mode.
  337. .SH "GRAPHICS INTERFACE"
  338. When running the window-based graphics interface, there will be 5
  339. windows displaying panels of commands, message headers and a text
  340. window which is used for displaying messages or writing messages
  341. to send to other users.
  342. .PP
  343. The panel items have labels describing their functionality.
  344. Selecting
  345. a panel item with the LEFT mouse button causes the action to be executed.
  346. The RIGHT mouse button displays a menu of options that the command may
  347. branch to.
  348. For example, the
  349. .B save
  350. panel item by default will save messages to the file "mbox", but if the
  351. RIGHT mouse button causes a menu to be displayed the choices of where
  352. to save the message increases to include the items in the menu.
  353. These typically include the files in the user's folder directory (see the
  354. .B folder
  355. variable below).
  356. .PP
  357. At the end of each list of menu entries for panel items is an item
  358. labelled \*Qhelp\*U.
  359. When this item is chosen, help with that command
  360. is displayed in the center of the console.
  361. .PP
  362. When composing letters, the interface is the same for the tool mode,
  363. the line mode and the curses mode.
  364. Tilde escapes are recognized by all
  365. the interfaces, but the tool interface allows the user to use the menu
  366. mouse button to select the tilde escape desired.
  367. .PP
  368. If the user wishes to review a mail message while in edit-mode, he may
  369. do as the other interfaces and enter the tilde escape command \*Q~:print\*U.
  370. This will cause the current message (or the numbered message, if given) to
  371. be displayed in the window.
  372. Editing is temporarily put on hold till the user
  373. enters a `q' in the message window to indicate that he is done reading the
  374. message and input is to be directed again to the letter being composed.
  375. .SH COMMANDS
  376. Described below are legal commands understood by
  377. .I Mush
  378. that you can type at the line mode prompt.
  379. Most commands have abbreviations
  380. (given in parentheses) and can be followed by message lists.
  381. In most cases,
  382. whitespace is not necessary to separate commands from message lists.
  383. For example, \*Qd*\*U will delete all messages, and \*Qu1-7 {4}\*U will
  384. undelete messages 1 through 7 except for message number 4.
  385. .PP
  386. The ability to customize commands using the
  387. .B cmd
  388. facility allows users to customize
  389. .I Mush
  390. to resemble other mailers.
  391. However, efforts have already been made to include commands which are backwards
  392. compatible with other line-mode mailers.
  393. Users of the graphics tool mode of
  394. .I Mush
  395. may have little need for the command line mode because the icon based
  396. interface allows interaction with many commands.
  397. The graphics mode is much more restrictive in favor of user
  398. friendliness but most useful commands may be achieved anyway.
  399. .PP
  400. The following is a list of all recognized commands.
  401. .TP
  402. .B alternates
  403. .RB ( alts )
  404. This command
  405. is useful if you have accounts on several machines.
  406. It can be used to inform
  407. .I Mush
  408. that the listed addresses are really you.
  409. When you
  410. .B reply
  411. to messages,
  412. .I Mush
  413. will not send a copy of the message to any of the addresses
  414. listed on the
  415. .B alternates
  416. list.
  417. If the
  418. .B alternates
  419. command is given with no argument, the current set of alternate
  420. names is displayed.
  421. .TP
  422. .B cd
  423. Change the working directory to that specified, if given.
  424. If no directory is given, then changes to the user's home directory.
  425. .TP
  426. .BR cmd / uncmd
  427. Command line aliases are set and unset using these commands.
  428. More extensive information is given in the LINE-MODE INTERFACE section.
  429. .B Uncmd
  430. may take `*' as an argument to uncmd everything set.
  431. .TP
  432. .BR debug " [N]"
  433. Set debugging level to N (1 by default).
  434. When in debug mode, the user can see some of the flow of
  435. control the program makes while executing.
  436. The intent of the debug level is for tracking down
  437. bugs with the program at specific locations.
  438. Periodically, the program may segmentation fault and core dump.
  439. When this happens, the user can reenter the program,
  440. set the debugging level and recreate the problem.
  441. .sp
  442. If the user suspects memory allocation problems, a debugging
  443. level of 2 or higher will prevent memory from being freed causing no
  444. overwriting of memory bounds.
  445. .sp
  446. If the user suspects sendmail errors,
  447. a debugging level of 3 or higher will prevent sendmail from starting
  448. and outgoing mail is sent to the standard output instead of actually
  449. being sent.
  450. .TP
  451. .BR delete / undelete
  452. .RB ( d / u )
  453. Takes a message list as argument and marks them all as deleted.
  454. Deleted messages will not be saved in
  455. .IR mbox ,
  456. nor will they be available for most other commands.
  457. If the folder has not been updated, deleted messages can be recovered
  458. with
  459. .BR undelete .
  460. .TP
  461. .B dt
  462. Deletes the current message and prints the next message.
  463. .TP
  464. .B echo
  465. Echoes all the arguments given on the command line, expanding variables
  466. and history references.
  467. .TP
  468. .B exit
  469. .RB ( x )
  470. Effects an immediate return to the login shell without
  471. modifying the current folder or system spool directory.
  472. .TP
  473. .B expand
  474. Aliases, given as arguments, are expanded as they would be if you
  475. were to send mail to each.
  476. .TP
  477. .BR fkey / unfkey
  478. Prints the values of the function keys.
  479. The function keys are used in
  480. the graphics tool mode only.
  481. You can set the values of function keys explicitly using the
  482. .B fkey
  483. command, but the whole process is automated by using the function key
  484. interface provided by the graphics mode.
  485. By default, the last key in each function key pad displays
  486. the values of all the function keys in that set of function keys.
  487. There are the left, right and top set of keys.
  488. .TP
  489. .BR folder " [\-N] [\-r] [!] [ %[user] | # | & | file ]"
  490. .RB ( fo )
  491. Change current folder.
  492. With no arguments, prints the name of the current folder.
  493. The arguments are:
  494. .nf
  495. .ta 1i
  496. .in +2
  497. \-N    No headers are displayed upon entering new folder
  498. \-r    Set Read-Only mode (can't alter new folder)
  499. !    If specified, the current folder is not updated
  500. %[user]    Change to /usr/spool/mail/[user] (default is yours)
  501. #    Switch back to the previous folder
  502. &    Change folder to $mbox (default is ~/mbox)
  503. .in -2
  504. .fi
  505. .TP
  506. .B folders
  507. List the names of the folders in your folder directory.
  508. Your folder directory is the directory
  509. .I Mail
  510. in your home directory.
  511. Or, you can set the variable
  512. .B folder
  513. to specify another folder directory.
  514. .br
  515. .TP
  516. .BR from " [ + | \- ]"
  517. .RB ( f )
  518. With no arguments, from will print the current message's header.
  519. If given a message list, from will print the headers of those
  520. messages which are in the list.
  521. .sp
  522. The special arguments `\-' and `+' can be given to move the
  523. current message pointer to the previous or next message
  524. respectively while also printing that message's header.
  525. If a message list was given in addition to `\-' or `+', then
  526. the current message pointer will be set to the first or last
  527. message, respectively, in the message list given.
  528. Examples:
  529. .sp
  530. .ti +2
  531. pick \-f Dan | from +
  532. .sp
  533. will print the headers of all messages that contain Dan in
  534. in the author's name and set the current message pointer to
  535. the last one of that kind in the list.
  536. .sp
  537. .ti +2
  538. from \- 10-30 {16}
  539. .sp
  540. will print the headers of messages 10 through 30 except for
  541. message 16 and set the current message pointer to 10.
  542. .sp
  543. .ti +2
  544. from +
  545. .sp
  546. will print the header of the message after the current message
  547. and increment the current message pointer to the next message.
  548. .sp
  549. .ti +2
  550. from $
  551. .sp
  552. will print the last message's header and not move the current
  553. message pointer.
  554. .TP
  555. .BR headers " [ \-H[:c] ] [ + | \- ]"
  556. .RB ( h ,
  557. .BR z )
  558. Prints a screenful of message headers listed in the
  559. current folder.
  560. If a message number is given on the command line,
  561. the first message of the screenful of messages will be
  562. that message number.
  563. The `z' command is identical to the \*Qh +\*U
  564. command and remains for compatibility reasons.
  565. The variable
  566. .B screen
  567. may be set to tell how many headers are in a screenful.
  568. In the graphics tool mode, the variable
  569. .B screen_win
  570. contains the number of headers used in the headers subwindow.
  571. .sp
  572. A typical header may look like:
  573. .sp
  574. .ti +2
  575. 5 >N  argv@spam.istc.sri.com Feb 19, (10/278) Test
  576. .sp
  577. This line indicates that it is message number 5 and the
  578. .I >
  579. indicates that the \*Qcurrent message pointer\*U is pointing to this
  580. message.
  581. The next two positions indicate the message status.
  582. The first
  583. may be one of, \*QN\*U (new and unread), \*QU\*U (old, but still
  584. unread), \*Q*\*U (deleted), \*QO\*U (old and read), \*QP\*U (preserved),
  585. or \*Q \*U (read).
  586. The second position may have an \*Qr\*U if the message
  587. has been replied to.
  588. .sp
  589. The author of the example message header is
  590. .IR argv@spam.istc.sri.com ,
  591. the date is
  592. .IR "Feb 19" ,
  593. the number of lines in the message is
  594. .IR 10 ,
  595. the number of characters is
  596. .I 278
  597. and the subject of the message is
  598. .IR Test .
  599. The format of the message header exemplified here is described by
  600. the string variable
  601. .BR hdr_format .
  602. The example given above has a hdr_format of
  603. .sp
  604. .ti +2
  605. set hdr_format = "%25f %7d (%l/%c) %25s"
  606. .sp
  607. See the description of
  608. .B hdr_format
  609. in the VARIABLES section for more information on header formats.
  610. .sp
  611. You can print a special subset of message headers by using the
  612. .I \-H:c
  613. option, where `c' is one of:
  614. .nf
  615. .in +2
  616. .ta 1i
  617. n    new messages
  618. d    deleted messages
  619. u    unread messages
  620. o    old messages
  621. r    replied to messages
  622. a    all messages
  623. .fi
  624. .in -2
  625. .sp
  626. More options to the
  627. .B headers
  628. command include
  629. .RI ` + '
  630. and
  631. .RI ` \- '.
  632. Each will print the next or previous screenful of message headers.
  633. The
  634. .B z
  635. command can also be used; `z' alone will print the next
  636. screenful (thus, the `+' is optional),
  637. and \*Qz \-\*U is equivalent to \*Qh \-\*U.
  638. .sp
  639. Headers affects all the messages it displays, so piping may be done
  640. from the headers command.
  641. Piping to the headers command causes the
  642. message headers affected by the previous command to be printed.
  643. This action is identical to piping to the
  644. .B from
  645. command.
  646. .TP
  647. .B help
  648. Help is provided on a per topic basis and on a general basis.
  649. For general help, just typing
  650. .I help
  651. will provide some general information as to how to get further help
  652. and a list of topics suggested for more specific help.
  653. There is also help provided for each command by using the \-?
  654. option to most commands.
  655. This option will provide command line usage information as well as a
  656. description of what the command does and how to use it.
  657. .TP
  658. .BR history " [\-h] [\-r] [N]"
  659. This command displays the command history in chronological order; early
  660. commands are printed first followed by more recent commands displayed last.
  661. Option
  662. .I \-h
  663. suppresses printing of history event numbers with each history command.
  664. Option
  665. .I \-r
  666. reverses the order of the history events displayed.
  667. .sp
  668. If a number
  669. .I N
  670. is given, then that number of previous commands is
  671. echoed rather than the number set by the variable
  672. .BR history .
  673. .TP
  674. .BR ignore / unignore
  675. Display or set a list of headers to be ignored when displaying messages.
  676. When reading messages, all the message headers are displayed with the text
  677. body of the message.
  678. Since these message identifier fields are cumbersome and uninteresting
  679. in many cases, you can filter out unwanted headers by using this command.
  680. For example,
  681. .sp
  682. .ti +2
  683. ignore Received Date Message-Id
  684. .sp
  685. will ignore the three specified fields.
  686. The command
  687. .B unignore
  688. is used to reverse the effects of
  689. .BR ignore .
  690. .TP
  691. .BR lpr " [\-Pname] [msg_list]"
  692. takes a message list and sends those messages, one by one, to the printer,
  693. each separated by page feeds.
  694. A default printer name is supplied if one is not specified on the
  695. command line (-Pprinter-name).
  696. If you have the variable
  697. .B printer
  698. set, that printer name will be used.
  699. .sp
  700. If the variable
  701. .B print_cmd
  702. is set, the command described by that variable will be used instead
  703. of the default system command.
  704. In such cases, the -P option and the
  705. .B printer
  706. variable are ignored and the command is simply executed as is.
  707. This is useful for piping messages through to UNIX
  708. commands (commands not a part of
  709. .IR Mush .
  710. .TP
  711. .B ls
  712. This command duplicates the
  713. .I UNIX
  714. command
  715. .I /bin/ls.
  716. The variable
  717. .B lister
  718. describes flags to be passed to ls automatically.
  719. By default,
  720. .I ls
  721. always uses the -C flag (column output).
  722. .TP
  723. .BR mail " [flags] [recipient ...]"
  724. .RB ( m )
  725. Send mail to a list of users.
  726. If no recipient list is specified on the
  727. .I Mush
  728. command line, then a \*QTo: \*U prompt will request one.
  729. A list of recipients must be supplied.
  730. This implementation of
  731. .I Mush
  732. supports mailing to files and programs as recipients, but at least one
  733. legitimate user must be specified.
  734. Filenames must be full pathnames, thus, they must start with a `/' or there
  735. is no way to know whether a recipient is a pathname or a real user.
  736. The special characters `+' and `~' may precede pathnames since they are
  737. expanded first to the user's folder directory (+), as described by the variable
  738. .BR folder ,
  739. and the user's home directory (~).
  740. Mailing to programs is indicated by the pipe `|' character preceding the
  741. program name.
  742. Since the user's path is searched, full pathnames are not required for
  743. programs which lie in the user's PATH environment variable.
  744. Example:
  745. .sp
  746. .ti +2
  747. mail username, /path/to/filename, "|program_name", +folder_name, ~user/mbox
  748. .sp
  749. Options are:
  750. .nf
  751. .in +2
  752. .if n .ta 1.5i
  753. .if t .ta 1.8i
  754. \-e    immediately enter editor (autoedit)
  755. \-F    add random fortune to the end of message
  756. \-s [subject]    prompt for subject [set subject explicitly]
  757. \-f [msg_list]    forward msg_list (not indented)
  758. \-h [msg_list]    include msg_list with headers
  759. \-i [msg_list]    include msg_list into letter
  760. \-v    verbose (passed to mail delivery program)
  761. .in -2
  762. .fi
  763. .sp
  764. The verbose option may not be available depending on the mail transport
  765. agent on your system.
  766. .sp
  767. The \-e flag causes you to enter the editor described by the variable
  768. .BR visual .
  769. .sp
  770. The \-i flag will include the current message into the body of the
  771. message you are about to send.
  772. The included message is indented by
  773. the string \*Q> \*U or by the string described by the variables
  774. .BR indent_str ,
  775. .BR pre_indent-str ,
  776. and
  777. .BR post_indent_str .
  778. See the VARIABLES section for more information on these string values.
  779. If a message list is given after the \-i option, then the message
  780. described by that list are included.
  781. The \-h option is identical to the \-i option except that the headers of
  782. the message are also included.
  783. .sp
  784. The \-s flag looks at the next argument and sets the subject to that
  785. string.
  786. If the string is to contain spaces, enclose the entire subject
  787. in quotes.
  788. If there is no following argument, then the subject will
  789. be prompted for.
  790. This flag is useful if the user:
  791. .sp
  792. .in +2
  793. .nf
  794. \(bu    does not have the variable \fBask\fR set, or
  795. \(bu    wishes to change the subject used with \fBreply\fR
  796. .in -2
  797. .fi
  798. .sp
  799. The subject is not prompted for and is ignored completely if the \-f flag
  800. is specified (see below).
  801. .sp
  802. The \-f flag is for message forwarding only.
  803. An optional message list can be given just as the -i option has.
  804. The forward option does not allow you to edit the message(s) being forwarded
  805. unless the -e flag is also specified.
  806. The subject of the message (if available) is the same as the \fIcurrent\f
  807. message; it not necessarily the message of the message being forwarded.
  808. The subject of forwarded mail cannot be changed.
  809. However, using the \-e flag
  810. will allow the user to change the subject once in editing mode using the
  811. escape sequence, \*Q~s\*U.
  812. .sp
  813. Forwarded mail that has not been edited by the user will contains special
  814. headers such as
  815. .sp
  816. .ti +2
  817. Resent-To:
  818. .ti +2
  819. Resent-From:
  820. .sp
  821. and perhaps other depending on your mail transport agent.
  822. Sendmail, for example, will add a number of other \*QResent-*\*U headers.
  823. .TP
  824. .BR my_hdr / un_hdr
  825. You can create personalized headers in your outgoing mail using this command.
  826. .sp
  827. .nf
  828. Usages:
  829. .in +2
  830. .ta 2.5i
  831. my_hdr    print all your headers
  832. my_hdr header    print value of header
  833. my_hdr header: string    set header to string
  834. un_hdr header:    unset header
  835. .in -2
  836. .sp
  837. .fi
  838. To set a header, the first argument must be a string
  839. that contains no whitespace (spaces or tabs) and must end with
  840. a colon (:).
  841. The rest of the command line is taken to be the
  842. text associated with the mail header specified.
  843. If any quotes are used in the header and the header itself is not set in
  844. quotes, then quotes should be escaped (preceded) by a backslash.
  845. This holds true for semicolons, pipe characters
  846. or any other metacharacter that
  847. .I Mush
  848. might interpret as a command line modifier.
  849. .sp
  850. If the variable
  851. .B no_hdrs
  852. is set, then your headers will not be added to outgoing messages,
  853. but no headers will be unset.
  854. The
  855. .B un_hdr
  856. command may take `*' as an argument to un_hdr everything set.
  857. .TP
  858. .BR pick " [flags] [<pattern>]"
  859. Allows the user to select particular messages from a folder.
  860. The <pattern> is a \*Qregular expression\*U as described by
  861. .IR ed .
  862. If no arguments are given, the previous expression searched for is used.
  863. You can search for messages from a user, for a particular subject line,
  864. between certain dates, and limit searches to a range of messages.
  865. You can also find all messages that do not
  866. match the same arguments mentioned above.
  867. .sp
  868. .nf
  869. Options:
  870. .ta 1.5i
  871. .in +2
  872. \-d [\-]date    messages sent on or after [`\-' before] date
  873. \-f    search for pattern in \*QFrom\*U field only
  874. \-h header    search for pattern in specified header only
  875. \-i    ignore case of letters when searching
  876. \-r msg_list    search only the listed messages
  877. \-s    search for pattern in \*QSubject\*U field only
  878. \-t    search for pattern in \*QTo\*U field only
  879. \-x    select messages not containing the pattern
  880. .in -2
  881. .fi
  882. .sp
  883. Only one of \-d, \-f, \-h, \-s and \-t can be specified at once.
  884. Entire messages are scanned for the <pattern>
  885. unless \-f, \-h, \-s or \-t is specified.
  886. Messages marked for deletion are also searched.
  887. No patterns can be specified with the \-d option,
  888. and the \-x option may not be used with \-d.
  889. .sp
  890. For the \-d option, \*Qdate\*U is of the form:
  891. .sp
  892. .ti +2
  893. month/day/year
  894. .sp
  895. with an optional `\-' to specify that the messages of interest are those
  896. older than that date.
  897. Omitted fields of the date default to today's values.
  898. Examples of selecting on date:
  899. .nf
  900. .in +2
  901. .ta 2.0i
  902. .sp
  903. pick \-d 4/20    on or after April 20, this year
  904. pick \-d \-/2/85    on or before the 2nd, this month, 1985
  905. pick \-d /    today only
  906. .fi
  907. .in -2
  908. .sp
  909. At least one `/' char must be used in a date.
  910. There is no strong date checking; 2/30 would be considered a valid date.
  911. .sp
  912. Other examples of
  913. .B pick:
  914. .sp
  915. .ti +2
  916. pick \-d 2/5/86 | pick \-d \-2/5/87 | pick \-s "mail stuff" | lpr
  917. .sp
  918. will find all the messages between the dates February 5, 1986 and
  919. February 5, 1987 that contain the subject "mail stuff" and print them.
  920. .sp
  921. .ti +2
  922. pick -s Re: | delete
  923. .sp
  924. deletes messages that have \*QRe:\*U in the subject
  925. .sp
  926. .ti +2
  927. folder +project | pick -f frank
  928. .sp
  929. Finds all messages from frank in the folder described by +project.
  930. .sp
  931. .ti +2
  932. pick -h return-path ucbvax
  933. .sp
  934. Searches all messages that have the header "Return-Path:" and determines
  935. if the string \*Qucbvax\*U is in the header.
  936. Note that case sensitivity
  937. applies only to the pattern searched, not the header itself.
  938. .TP
  939. .B preserve
  940. .RB ( pre )
  941. Saves a message list in your spool directory rather than
  942. your mailbox unless it has been explicitly deleted.
  943. The variable
  944. .B hold
  945. causes all messages to be held in your spool directory automatically.
  946. .TP
  947. .B print
  948. .RB ( p ,
  949. .BR type ,
  950. .BR t )
  951. Takes a message list and displays each message on the user's terminal.
  952. If the first letter of the command is a capital letter (`P' or `T'),
  953. then \*Qignored\*U headers are not ignored
  954. .I provided
  955. that the variable,
  956. .B alwaysignore
  957. is not set.
  958. If the variable is set, the ignored headers will be
  959. ignored regardless of the command used to display the message.
  960. See the
  961. .B ignore
  962. command for more information about ignored message headers.
  963. .sp
  964. The `+' and the `-' keys can be used to display the \*Qnext\*U
  965. and \*Qprevious\*U messages respectively.
  966. The `+' key has the caveat that the
  967. message is not paged at all and none of the messages headers are displayed.
  968. .TP
  969. .B pwd
  970. Prints the current working directory.
  971. .TP
  972. .B quit
  973. .RB ( q )
  974. Updates the current folder and exits from
  975. .IR Mush .
  976. If the variable \*Qhold\*U is set, all messages not marked for deletion are
  977. saved in the spool directory.
  978. Otherwise, messages which have been read are saved to
  979. .I ~/mbox
  980. or to the file described by the string variable
  981. .BR mbox .
  982. Messages marked for deletion are discarded.
  983. Unread messages go back to the spool directory in all cases.
  984. .TP
  985. .BR reply / replyall " [flags]"
  986. .RB ( r / R )
  987. Messages are replied to by sending mail to the sender of each message
  988. in the given message list.
  989. The commands
  990. .B replysender
  991. and
  992. .B respond
  993. are equivalent to
  994. .BR reply .
  995. .B Replyall
  996. responds to all the recipients as well as the sender of the message.
  997. These commands understand all the same flags as the
  998. .B mail
  999. command.
  1000. .sp
  1001. When constructing a return mail address to the author of a message,
  1002. .B reply
  1003. searches for special mail headers in the author's message which
  1004. indicate the most efficient mail path for return mail.
  1005. .I Mush
  1006. will search for the \*QFrom:\*U, \*QReply-To:\*U,
  1007. and \*QReturn-Path:\*U headers by default.
  1008. .sp
  1009. If none of these fields are found in the message, the first line of the
  1010. message is parsed;
  1011. this \*QFrom \*U line is different from the \*QFrom: \*U line.
  1012. If the user wishes to change the order or the actual fields to search for
  1013. return paths, then the variable
  1014. .B reply_to_hdr
  1015. may be set to a list of headers to be used (in the order specified).
  1016. If it is set, but has no value, the first \*QFrom \*U line is used
  1017. regardless of what headers the author's message contains.
  1018. This is a special case setting for the variable \*-
  1019. the \*QFrom \*U line may not be specified explicitly as an item in the
  1020. list of reply-to headers.
  1021. .sp
  1022. When replying to all recipients of the message using the
  1023. .B replyall
  1024. .RB ( R )
  1025. command, only the original author's address can be obtained from
  1026. the message headers.
  1027. There is no way determine the best path to the
  1028. other recipients of the message from message headers aside from taking
  1029. their addresses directly from the \*QTo:\*U and \*QCc:\*U lines.
  1030. .sp
  1031. Also see the explanation of the variable
  1032. .B auto_route
  1033. and the MAIL ADDRESSES section for more information concerning
  1034. replying to messages.
  1035. .TP
  1036. .BR save / write / copy " [!] [message list] [filename]"
  1037. .RB ( s / w )
  1038. With no arguments,
  1039. .B save
  1040. and
  1041. .B write
  1042. will save the current message to the file
  1043. .I mbox
  1044. in the user's home directory (or the file specified by the
  1045. .B mbox
  1046. variable).
  1047. If a message list is given, then the messages specified by
  1048. the list are saved.
  1049. If a filename is given, then that filename is used instead of mbox.
  1050. If the file exists and is writable, the specified command
  1051. will append each message to the end of the file.
  1052. If the `!' is given, then the file is overwritten causing whatever contents it
  1053. contains to be lost.
  1054. The
  1055. .B write
  1056. command differs from
  1057. .B save
  1058. and
  1059. .B copy
  1060. in that the message headers are
  1061. .I not
  1062. saved in the file along with the body of text.
  1063. .sp
  1064. If the current folder is the system mailbox, then saved messages are
  1065. marked for deletion when the user exits using the
  1066. .B quit
  1067. command.
  1068. If the variable
  1069. .I keepsave
  1070. is set or the current folder is not the system mailbox, then messages are
  1071. not marked for deletion.
  1072. The
  1073. .B copy
  1074. command is is like
  1075. .B save
  1076. except that messages are never marked for deletion, whether or not
  1077. .B keepsave
  1078. is set.
  1079. .sp
  1080. Because message lists are used to determine the messages to be saved,
  1081. if the user wishes to save messages to a file that begins with a digit
  1082. or any other message list metacharacter, a backslash should precede
  1083. the filename to escape the message list expansion routine.
  1084. The backslash will not become a part of the filename.
  1085. .TP
  1086. .BR saveopts " [file]"
  1087. The complement of
  1088. .BR source ,
  1089. .B saveopts
  1090. will save all settable variables, aliases
  1091. and cmd's in the initialization file.
  1092. (See the
  1093. .B source
  1094. command for more information on initialization files.)
  1095. If an argument is given, that file is used.
  1096. Beware that this will overwrite files, so any \*Qif\*U expressions
  1097. will be lost, as will settings that have changed since entering
  1098. .IR Mush .
  1099. Using saveopts is highly discouraged
  1100. and is intended for the naive user only.
  1101. .TP
  1102. .BR set / unset
  1103. With no arguments, prints all variable values.
  1104. Otherwise, sets option.
  1105. Arguments are of the form \*Qoption=value\*U (whitespace is allowed).
  1106. Boolean expressions need not have \*Q=value\*U associated in the command.
  1107. .sp
  1108. The special command
  1109. .sp
  1110. .ti +2
  1111. set ?all
  1112. .sp
  1113. will print all known variables utilized by the program and a brief
  1114. description of what they do.
  1115. The user may set and manipulate his own set of variables, but internal
  1116. variables that are utilized by the program are the only ones displayed.
  1117. .sp
  1118. The command
  1119. .sp
  1120. .ti +2
  1121. set ?variable_name
  1122. .sp
  1123. will print the same information for one variable instead of all variables.
  1124. You may unset everything by issuing the command \*Qunset *\*U.
  1125. .TP
  1126. .BR sh " [command]"
  1127. Invokes an interactive version of the shell.
  1128. The shell spawned is described by the variable
  1129. .BR shell .
  1130. If the optional argument
  1131. .B command
  1132. is given, then that command is executed under the Bourne Shell.
  1133. If the special character `&' is at the end of any shell command,
  1134. then the command will be executed in background.
  1135. .TP
  1136. .BR source " [file]"
  1137. Read
  1138. .I Mush
  1139. commands from a file.
  1140. If no filename is specified, the files searched
  1141. for are .mushrc or .mailrc in the user's home directory.
  1142. If the environment variable MAILRC is set, then that file is sourced.
  1143. If a filename is given on the command line, that file is sourced.
  1144. See the
  1145. .B INITIALIZATION
  1146. heading and the
  1147. .B home
  1148. variable descriptions for more information.
  1149. .TP
  1150. .B sort " [-] [d | a | s | S | R]"
  1151. This command
  1152. will sort messages according to author, date, status or subject
  1153. (with or without considering the "Re: ", in replied messages).
  1154. In addition, the messages can be sorted in reverse order (same arguments).
  1155. .sp
  1156. .nf
  1157. Options:
  1158. .in +2
  1159. .ta 1i
  1160. -    reverse sort order
  1161. d    sort by date received
  1162. a    sort by author (alphabetical)
  1163. s    sort by subject ignoring \*QRe:\*U
  1164. R    sort by subject (alphabetical)
  1165. S    sort by message status
  1166. .in -2
  1167. .fi
  1168. .sp
  1169. Note that only one argument (except for the `-'), may be used.
  1170. By default (no arguments),
  1171. .B sort
  1172. sorts messages by
  1173. .IR status .
  1174. New, unread messages are first, followed by preserved messages,
  1175. and finally deleted messages are placed at the end of the list.
  1176. .sp
  1177. If the variable
  1178. .I sort
  1179. is set, messages are sorted each time the user's system mailbox is
  1180. read as the current folder.
  1181. The
  1182. .I sort
  1183. variable can be set either to nothing or to legal "sort" arguments.
  1184. .sp
  1185. Subsorting can be achieved by using the piping mechanism intrinsic to
  1186. the line mode interface;
  1187. no other interface allows subsorting \*Qdirectly\*U.
  1188. Each interface may allow subsorting if appropriate actions are taken,
  1189. as discussed below.
  1190. .sp
  1191. To subsort messages, the folder must be in a particular order to begin
  1192. with.
  1193. To sort mail by author and then by subject heading, you would
  1194. have to first sort by author:
  1195. .sp
  1196. .ti +2
  1197. sort a
  1198. .sp
  1199. Now that the messages are in order according to author, sorting a
  1200. sublist of messages is done using pipes:
  1201.