home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / mush.lzh / mush.3 < prev    next >
Encoding:
Text File  |  1990-05-06  |  55.0 KB  |  1,727 lines

  1.  
  2. #! /bin/sh
  3. # This is a shell archive.  Remove anything before this line, then feed it
  4. # into a shell via "sh file" or similar.  To overwrite existing files,
  5. # type "sh file -c".
  6. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  7. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  8. # If this archive is complete, you will see the following message at the end:
  9. #        "End of archive 3 (of 19)."
  10. # Contents:  mush/makefile.xenix mush/mush.1.b
  11. # Wrapped by argv@turnpike on Wed May  2 13:59:20 1990
  12. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  13. if test -f 'mush/makefile.xenix' -a "${1}" != "-c" ; then 
  14.   echo shar: Will not clobber existing file \"'mush/makefile.xenix'\"
  15. else
  16. echo shar: Extracting \"'mush/makefile.xenix'\" \(2244 characters\)
  17. sed "s/^X//" >'mush/makefile.xenix' <<'END_OF_FILE'
  18. X#
  19. X# makefile for Xenix machines.  See "MODEL" below for your xenix type.
  20. X# some .c files may require the -LARGE compiler flag.  Examples below.
  21. X# This makefile assumes an 80386 machine.  If you have an 80286, see
  22. X# notes below.  This makefile was built for SCO/microsoft xenix --if you
  23. X# are running some other kind of xenix, you might need to change the
  24. X# CFLAGS and LDFLAGS options.
  25. X#
  26. XHDRS= mush.h config.h-dist strings.h bindings.h options.h version.h glob.h
  27. XSRCS1= main.c init.c misc.c execute.c
  28. XSRCS2= signals.c msgs.c pick.c viewopts.c
  29. XSRCS3= sort.c expr.c folders.c dates.c
  30. XSRCS4= loop.c bind.c options.c
  31. XSRCS5= commands.c setopts.c hdrs.c
  32. XSRCS6= mail.c print.c
  33. XSRCS7= curses.c curs_io.c
  34. XSRCS8= file.c strings.c malloc.c
  35. XSRCS9= lock.c macros.c addrs.c glob.c
  36. XOBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
  37. X      signals.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  38. X      folders.o dates.o loop.o viewopts.o bind.o curses.o curs_io.o \
  39. X      lock.o macros.o options.o addrs.o malloc.o glob.o
  40. XHELP_FILES= README README-7.0 README-7.1 mush.1 cmd_help \
  41. X    Mushrc Mailrc Gnurc sample.mushrc advanced.mushrc digestify
  42. X
  43. X# Memory model.  Use -M3e for 80386 machines.
  44. X# Use -M2le -Mt32 -LARGE for 80286 machines.
  45. XMODEL= -M3e
  46. X
  47. X#
  48. X# 80286 xenix may use this LDFLAGS define:
  49. X#LDFLAGS= -X -lx -M2le -Mt32 -F 8000 -SEG 256 -LARGE
  50. XLDFLAGS= -X -lx -M3
  51. X
  52. XCFLAGS= $(MODEL) -O -DSYSV -DCURSES -DREGCMP -DUSG 
  53. XLIBES= -lcurses -ltermlib
  54. XOTHERLIBS=
  55. X# Use some variant of this one if you #define MMDF in config.h
  56. X#OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
  57. X
  58. Xmush: $(OBJS)
  59. X    @echo loading...
  60. X    @cc $(LDFLAGS) $(OBJS) $(LIBES) $(OTHERLIBS) -o mush
  61. X
  62. X$(OBJS): config.h mush.h
  63. Xloop.o: version.h
  64. X
  65. X# For 80286 machines, use these two lines...
  66. X# misc.o:    misc.c
  67. X#     cc $(CFLAGS) -LARGE -c misc.c
  68. X
  69. Xbind.o:    bind.c
  70. X    cc $(CFLAGS) -LARGE -c bind.c
  71. X
  72. Xclean:
  73. X    rm -f *.o core mush
  74. X
  75. XBINDIR= /usr/local/bin
  76. XLIBDIR= /usr/local/lib
  77. XMRCDIR= /usr/lib
  78. XMANDIR= /usr/local/man/man1
  79. XMANEXT= 1
  80. X
  81. Xinstall: mush
  82. X    cp mush $(BINDIR)
  83. X    strip $(BINDIR)/mush
  84. X    chmod 0755 $(BINDIR)/mush
  85. X    cp mush.1 $(MANDIR)/mush.$(MANEXT)
  86. X    chmod 0644 $(MANDIR)/mush.$(MANEXT)
  87. X    cp cmd_help $(LIBDIR)
  88. X    chmod 0644 $(LIBDIR)/cmd_help
  89. X    cp Mushrc $(MRCDIR)/Mushrc
  90. X    chmod 0644 $(MRCDIR)/Mushrc
  91. END_OF_FILE
  92. if test 2244 -ne `wc -c <'mush/makefile.xenix'`; then
  93.     echo shar: \"'mush/makefile.xenix'\" unpacked with wrong size!
  94. fi
  95. # end of 'mush/makefile.xenix'
  96. fi
  97. if test -f 'mush/mush.1.b' -a "${1}" != "-c" ; then 
  98.   echo shar: Will not clobber existing file \"'mush/mush.1.b'\"
  99. else
  100. echo shar: Extracting \"'mush/mush.1.b'\" \(50595 characters\)
  101. sed "s/^X//" >'mush/mush.1.b' <<'END_OF_FILE'
  102. Xbinding control character sequences in the initialization file.
  103. XThis format
  104. Xis also used to display the current key-command mappings by the program.
  105. X.PP
  106. XTo specify control characters in ASCII format for the bind command, the
  107. Xsequence \*Q\\Cc\*U is used where `c' is the
  108. Xcharacter that the control key will translate to and must be in upper case.
  109. XThe sequence \*Q\\CP\*U would map to control-P.
  110. XIf the user wishes to indicate the RETURN key, this is specified
  111. Xwith the string \*Q\\n\*U and
  112. Xthe tab key is specified by the string \*Q\\t\*U.
  113. XAs a more complex example, on a Wyse-50 terminal, the 8th function key
  114. Xoutputs the three characters: control-A, H, line-feed.
  115. XTo map this function key to a command, the
  116. Xuser would have to enter the sequence \*Q\\CAH\\n\*U as the key sequence,
  117. Xthen follow up with a valid curses command.  From then on, if the user
  118. Xpresses that function key,
  119. Xthe command mapped to it will be executed.
  120. X.PP
  121. XThe ESCAPE key is signified by the sequence, \*Q\\E\*U.
  122. XOn a Sun-3 workstation,
  123. Xthe R1 key outputs the character sequence: ESC, [, 2, 0, 8, z.
  124. XThe corresponding
  125. X.B bind
  126. Xkey sequence would be \*Q\\E[208z\*U.
  127. XRestrictions are that key sequences may not contain the space character
  128. Xunless bound in line mode, and can never begin with a digit.
  129. X.PP
  130. XWhenever a command is entered, other than `^L'
  131. X.RB ( redraw ),
  132. Xwhich causes the screen to scroll or be refreshed in any way,
  133. X.I Mush
  134. Xis left in the
  135. X.I continue
  136. Xmode.
  137. XWhen in this mode, the user is given his line-mode prompt followed
  138. Xby \*Q...continue...\*U indicating that he may issue a new command or
  139. Xreturn to the top level where the current message headers are displayed
  140. Xon the screen.
  141. XRemember that this is still the curses mode, but much time
  142. Xis saved by avoiding redrawing the screen after each command.
  143. XThe user may move up and down messages using the appropriate commands
  144. X(j/k by default) or anything else the curses mode allows.
  145. XOnly the exit and quit commands will return to the top level.
  146. XBecause of this, there are 2 additional
  147. Xways to \*Qquit\*U from curses mode and return to the login shell.
  148. XThe \*Qexit\*U and \*Qquit\*U commands will quit from the top level, but
  149. Xthe commands
  150. X.B exit!
  151. Xand 
  152. X.B quit!
  153. Xare used to exit from the \*Qcontinue\*U level in the curses interface as well
  154. Xas from the top level.
  155. X.PP
  156. XNote that the best way to understand the curses interface is to just use it.
  157. XIn line mode, the command \*Qcurses\*U puts you into curses mode.
  158. X.SH "GRAPHICS TOOL INTERFACE"
  159. XWhen running the window-based tool interface, there will be five
  160. Xsubwindows:
  161. Xa panel for folder-related commands and general options,
  162. Xa scrollable display of message header summaries,
  163. Xanother panel of message manipulation commands,
  164. Xa four-line scrollable window for warnings and output from certain commands,
  165. Xand a larger window which is used for displaying messages.
  166. XThe message display and command output windows can be scrolled with
  167. Xthe up and down cursor keys (function keys R8 and R14 by default),
  168. Xand also recognize \*Qvi\*U movements (j, k, ^U, ^D, etc.),
  169. Xin addition to having scrollbars.
  170. X.PP
  171. XIn the header summary window, pressing the LEFT mouse button while pointing
  172. Xat a message header displays that message in the large message window at the
  173. Xbottom of the frame.
  174. XPressing the middle button deletes the message, and pressing the RIGHT mouse
  175. Xbutton displays a menu of actions that will affect the message.
  176. XPossible actions are to display the message, delete or undelete it, reply to
  177. Xit, save it, preserve it
  178. X(see the
  179. X.B preserve
  180. Xcommand), or print it (hardcopy).
  181. X.PP
  182. XAll panel items in the frame have labels describing their functionality.
  183. XSelecting
  184. Xa panel item with the LEFT mouse button causes the action to be executed.
  185. XThe RIGHT mouse button displays a menu of options that the command may
  186. Xbranch to.
  187. XFor example, the
  188. X.B Save
  189. Xpanel item by default will save messages to the file \*Qmbox\*U, but the
  190. XRIGHT mouse button causes a menu to be displayed, and the choices of
  191. Xwhere to save the message increase to include the items in the menu.
  192. XThese typically include the files in the user's folder directory (see the
  193. X.B folder
  194. Xvariable below).
  195. X.PP
  196. XAt the end of most lists of menu entries for panel items is an item
  197. Xlabelled \*Qhelp\*U.
  198. XWhen this item is chosen, an new window is opened where help for that
  199. Xcommand is displayed.
  200. XThe help windows can be scrolled in the same ways as the message
  201. Xdisplay window.
  202. X.I "Note:  The limited number of file descriptors in SunOS 3.5 forces"
  203. XMush
  204. X.I "to display help information in the"
  205. X.IR "message window in the main frame" .
  206. X.\" Some nroffs can't handle long .IR arguments
  207. X.PP
  208. XWhen composing letters,
  209. Xa separate frame is created which includes a panel of command items,
  210. Xa four-line scrollable window,
  211. Xand a large window for editing the letter.
  212. XPanel items for including messages, editing (via your usual text editor),
  213. Xsending, aborting the message, and various other manipulations are supplied.
  214. XSee the section on \*QSending mail\*U, under the summary of tilde escapes,
  215. Xfor more details of composition frame command items.
  216. XAs long as the composition frame is open, all
  217. X.I Mush
  218. Xcommand output is
  219. Xredirected from the small window in the main frame to the small window here.
  220. X\fINote:  This subwindow is not present in SunOS 3.5 due
  221. Xto the limited number of file descriptors; command output stays in the
  222. Xmain frame in that case\fR.
  223. XThe SunView
  224. X.I textsw
  225. Xinterface is used by default in the large window for paging and editing.
  226. XCursor movement with the function keys (R8, R10, R12, and R14 by default)
  227. Xis supported.
  228. X.SH COMMANDS
  229. XDescribed below are legal commands understood by
  230. X.I Mush
  231. Xthat you can type at the line mode prompt.
  232. XMost commands have abbreviations
  233. X(given in parentheses) and can be followed by message lists.
  234. XIn most cases,
  235. Xwhitespace is not necessary to separate commands from message lists.
  236. XFor example, \*Qd*\*U will delete all messages, and \*Qu1-7 {4}\*U will
  237. Xundelete messages 1 through 7 except for message number 4.
  238. X.B NOTE:
  239. X\fIThis \*Qtoken splitting\*U may have unexpected side effects, especially
  240. Xfor \fRUNIX\fI commands whose names contain digits.\fR
  241. X.PP
  242. XThe ability to customize commands using the
  243. X.B cmd
  244. Xfacility allows users to customize
  245. X.I Mush
  246. Xto resemble other mailers.
  247. XHowever, efforts have already been made to include commands that are backwards
  248. Xcompatible with other line-mode mailers.
  249. XUsers of the graphics tool mode of
  250. X.I Mush
  251. Xmay have little need for the command line mode because the icon based
  252. Xinterface allows interaction with many commands.
  253. XThe tool mode is much more restrictive in favor of a simpler, user
  254. Xfriendly interface, but most useful commands may be achieved anyway.
  255. X.PP
  256. XThe following is a list of all recognized commands.
  257. XSince most commands accept a
  258. X.I "message list"
  259. Xas an argument, arguments are noted only when they differ from a message list.
  260. X.TP
  261. X.BR alias " [name] [address-list]"
  262. X.ns
  263. X.TP
  264. X.BR unalias " name"
  265. XThe
  266. X.B alias
  267. Xcommand defines a name to stand for a list of addresses.
  268. XThe defined name can then be substituted for the entire list when
  269. Xsending mail.
  270. XFor example,
  271. X.sp
  272. X.nf
  273. X.ti +2
  274. Xalias dan dheller@cory.berkeley.edu argv@zipcode.com
  275. X.fi
  276. X.sp
  277. XThis defines the name \*Qdan\*U to be shorthand for two addresses,
  278. Xboth of which happen to be Dan Heller.
  279. X.sp
  280. XThe command
  281. X.B unalias
  282. Xcan be used to remove an alias definition.
  283. X.sp
  284. XWith no arguments,
  285. X.B alias
  286. Xprints out all the current aliases.
  287. XWith one argument, it prints the list associated with that name,
  288. Xand with more than one argument, it creates a new alias.
  289. X.TP
  290. X.BR alternates " [host-list] [!path!login] [*[user]]"
  291. X.RB ( alts )
  292. XThis command
  293. Xis useful if you have accounts on several machines.
  294. XIt can be used to inform
  295. X.I Mush
  296. Xthat your login name at each of the listed hosts is really you.
  297. XWhen you
  298. X.B reply
  299. Xto messages,
  300. X.I Mush
  301. Xwill not send a copy of the message to your login name at any of the
  302. Xhosts listed on the
  303. X.B alternates
  304. Xlist.  If the special symbol \*Q*\*U is used, then your login name is
  305. Xmatched against all pathnames and local addresses.
  306. XA user name may be appended to the \*Q*\*U, in which case that name is
  307. Xmatched instead of your login name.
  308. X.sp
  309. XIf you have another login name on the local or remote machine, then
  310. Xthat login may be specified by preceding the login name or the path
  311. Xto the login name by a `!' character.
  312. X.sp
  313. XFor example,
  314. X.sp
  315. X.nf
  316. X.ti +2
  317. Xalts zipcode maui1 !cory.berkeley.edu!dheller !root
  318. X.fi
  319. X.sp
  320. Xare all either hostnames or pathnames to my other accounts.
  321. XThe last item, \*Q!root\*U will match root that is only destined for my
  322. Xworkstation.
  323. XRoot accounts elsewhere are not considered to be me.
  324. X.sp
  325. XIf the
  326. X.B alternates
  327. Xcommand is given with no arguments, the current set of alternate
  328. Xnames is displayed.
  329. X.TP
  330. X.BR await " [\-T timeout]"
  331. XDirects the shell to wait for the arrival of new mail.
  332. XNew mail is checked approximately every 30 seconds, or every
  333. X.I timeout
  334. Xseconds as specified by the \-T option.
  335. XThis command does not return until new mail arrives
  336. Xor until a keyboard interrupt (^C) is typed.
  337. XUnless the string \*Qawait\*U appears in the value of the variable
  338. X.BR quiet ,
  339. Xthe terminal bell will ring when
  340. X.B await
  341. Xreads in a new message (see the VARIABLES section for details).
  342. X.TP
  343. X.BR bind " [string [command [parameters]]]"
  344. X.ns
  345. X.TP
  346. X.BR unbind " string"
  347. X.rs
  348. XBind the sequence of keystrokes specified by
  349. X.I string
  350. Xto the curses-mode function,
  351. X.IR command .
  352. XThe
  353. X.I string
  354. Xis usually one or two characters, or a sequence sent by
  355. Xone of the \*Qfunction keys\*U of a particular terminal.
  356. XSee the CURSES INTERFACE section for a complete list of curses-mode
  357. Xfunctions; this interface is not available on all systems.
  358. XThe
  359. X.I parameters
  360. Xare currently recognized only for the special
  361. X.B macro
  362. Xfunction; see the
  363. X.B bind-macro
  364. Xcommand for details.
  365. X.sp
  366. XIf no arguments are given to
  367. X.BR bind ,
  368. Xthe current set of curses bindings are listed;
  369. Xif only a
  370. X.I string
  371. Xargument is given, the binding for that string is listed;
  372. Xand if both a
  373. X.I string
  374. Xand a
  375. X.I command
  376. Xare given, a curses binding is created such that when the
  377. X.I string
  378. Xis typed in curses mode, the function specified by
  379. X.I command
  380. Xwill be executed.
  381. X.sp
  382. XBindings can be removed by using the
  383. X.B unbind
  384. Xcommand.
  385. X.TP
  386. X.BR bind-macro " [string [expansion]]"
  387. XThis command is an abbreviation, which invokes the
  388. X.B bind
  389. Xcommand with the special function
  390. X.B macro
  391. Xas the second argument.
  392. XThe effect of binding a curses macro is that whenever the
  393. X.I string
  394. Xis typed in curses mode, the effect is the same as if the
  395. X.I expansion
  396. Xhad been typed instead.
  397. XA special syntax is provided for including non-printing (control)
  398. Xcharacters in both the
  399. X.I string
  400. Xand the
  401. X.IR expansion ;
  402. Xsee the CURSES INTERFACE section and the MACROS section for details.
  403. X.sp
  404. XIf no arguments are given,
  405. X.B bind-macro
  406. Xwill list the current curses mode macros.
  407. XIt is otherwise identical to
  408. X.in +4
  409. X.B bind
  410. X.I string
  411. X.B macro
  412. X.IR expansion .
  413. X.in -4
  414. X.TP
  415. X.B cd
  416. XChange the working directory to that specified, if given.
  417. XIf no directory is given, then changes to the user's home directory.
  418. X.TP
  419. X.BR cmd " [name [command]]"
  420. X.ns
  421. X.TP
  422. X.BR uncmd " name"
  423. X.rs
  424. XCommand line aliases are set and unset using these commands.
  425. XMore extensive information is given in the LINE-MODE INTERFACE section.
  426. X.B Uncmd
  427. Xmay take `*' as an argument to uncmd everything set.
  428. X.TP
  429. X.BR curses " [off]"
  430. XThe
  431. X.B curses
  432. Xcommand causes
  433. X.I Mush
  434. Xto change from the line-oriented mode to the screen-oriented (curses)
  435. Xmode, as described above in the CURSES INTERFACE section.
  436. XThis command may not be given when curses mode is already active.
  437. XWhen used in an initialization file (such as
  438. X.IR .mushrc )
  439. Xthis command is the same as giving the \-C (\-curses) switch on the
  440. X.B mush
  441. Xcommand line.
  442. X.sp
  443. XThe argument
  444. X.I off
  445. Xmay be used
  446. X.I only
  447. Xin initialization files, including those read with \-I (\-init),
  448. Xand has the effect of turning off the \-C switch.
  449. X.I Off
  450. Xis ignored at all other times, even in files read with \-F (\-source).
  451. X.TP
  452. X.BR debug " [N]"
  453. XSet debugging level to N (1 by default).
  454. XWhen in debug mode, the user can see some of the flow of
  455. Xcontrol the program makes while executing.
  456. XThe intent of the debug level is for tracking down
  457. Xbugs with the program at specific locations.
  458. XOccasionally, the program may segmentation fault and core dump.
  459. XWhen this happens, the user can reenter the program,
  460. Xset the debugging level and recreate the problem.
  461. X.sp
  462. XIf the user suspects memory allocation problems, a debugging
  463. Xlevel of 5 or higher will prevent memory from being freed so that
  464. Xmemory bounds won't get overwritten.
  465. X.sp
  466. XIf the user suspects Mail Transport Agent errors,
  467. Xa debugging level of 3 or higher will prevent the MTA from starting
  468. Xand outgoing mail is directed to the standard output instead of actually
  469. Xbeing sent.
  470. X.TP
  471. X.BR delete / undelete
  472. X.RB ( d / u )
  473. XTakes a message list as argument and marks them all as deleted.
  474. XDeleted messages will not be saved in
  475. X.IR mbox ,
  476. Xnor will they be available for most other commands.
  477. XIf the folder has not been updated, deleted messages can be recovered
  478. Xwith
  479. X.BR undelete .
  480. X.TP
  481. X.B dt
  482. XDeletes the current message and prints the next message.
  483. X.TP
  484. X.BR echo " [-n] [-h | -p] arguments"
  485. XEchoes all the arguments given on the command line, expanding variables
  486. Xand history references.  If the -n flag is given, then no newline is appended.
  487. XIf the -h flag is given, then echo looks for formatting parameters
  488. Xas if the "from" command were given on the "current" message.
  489. XIf the -p flag is given, then echo looks for formatting parameters
  490. Xas if your prompt were changed temporarily.
  491. X.sp
  492. XExamples:
  493. X.sp
  494. X.nf
  495. X.ti +2
  496. Xecho -h This message is from %a and is dated %d.
  497. X.br
  498. Xmight produce:
  499. X.ti +2
  500. XThis message is from zipcode!argv and is dated Dec 14, 1988.
  501. X.sp
  502. X.ti +2
  503. Xecho -p There are %n new messages to read in %f.
  504. X.br
  505. Xmight produce:
  506. X.ti +2
  507. XThere are 5 new messages to read in /usr/spool/mail/argv.
  508. X.fi
  509. X.sp
  510. XNote that -h and -p cannot be specified together.
  511. X.TP
  512. X.B edit
  513. X.RB ( e ,
  514. X.BR v )
  515. XThis function lets you edit messages in your folder.  When editing messages,
  516. Xbe careful not to remove certain message headers such as Date or From or
  517. Xany others that looks important.  If you remove or change something you
  518. Xshouldn't have, you will be notified and the temporary file used to edit
  519. Xthe message will not be removed.
  520. X.TP
  521. X.BR eval " [\-h | \-p] arg ..."
  522. XAs in most shells, the list of arguments to
  523. X.B eval
  524. Xis re-parsed and then executed as a command.
  525. XThis is useful primarily for causing multiple levels of variable expansion.
  526. X.sp
  527. XIf the \-h option is given,
  528. X.B eval
  529. Xwill expand header format strings in the argument list before executing the
  530. Xcommand.
  531. XSimilarly, the \-p option will expand prompt format strings in the argument
  532. Xlist before executing.
  533. XThese formats are expanded \fIlast\fR, after all history and variable
  534. Xexpansion is completed, and are implicitly quoted, so embedded quotes,
  535. Xspaces, tabs, `!'s, etc. are handled correctly.
  536. XHeader formats are expanded using the 
  537. X.I current
  538. Xmessage.
  539. XFor example,
  540. X.sp
  541. X.ti +2
  542. Xeval \-h pick \-f %a
  543. X.sp
  544. Xwill find all messages from the same author as the current message.
  545. XSee the the entries for
  546. X.I hdr_format
  547. Xand
  548. X.I prompt
  549. Xin the VARIABLES section for more details.
  550. X.sp
  551. XNote that -h and -p cannot be specified together.
  552. X.TP
  553. X.B exit
  554. X.RB ( x )
  555. XReturns immediately to the login shell without
  556. Xmodifying the current folder or system spool directory.
  557. X.TP
  558. X.BR expand " alias-list"
  559. XAliases, given as arguments, are expanded as they would be if you
  560. Xwere to send mail to each.
  561. X.TP
  562. X.BR flags " [ [ + | \- ] [ D f N O P p R r S U ] ] [msg-list]"
  563. XThis command modifies the flag bits set on the listed messages.
  564. XIt should not normally be needed, but is provided to allow users, through
  565. Xthe
  566. X.B cmd
  567. Xfacility, to alter the ways that certain conditions are recorded.
  568. XMultiple flag bits may be set or modified at once.
  569. XThe modifiable flag bits are:
  570. X.sp
  571. X.nf
  572. X.ta 2i
  573. X.in +4
  574. XD    deleted
  575. Xf    forwarded
  576. XN    new
  577. XO    old
  578. XP    preserved
  579. Xp    printed
  580. XR    read
  581. Xr    replied-to
  582. XS    saved
  583. XU    unread
  584. X.in -4
  585. X.fi
  586. X.sp
  587. XIf a `+' or `\-' is included in the list of bits, the specified bits are
  588. Xturned on or off respectively, without modifying other bits.
  589. XIf no `+' or `\-' is given, then the list of bits is set explicitly and
  590. Xall other bits are lost.
  591. XThe `\-' modifier can be escaped with a backslash (i.e., \*Q\\\-\*U) to
  592. Xprevent its interpretation as part of a message range, or it may be given
  593. X\fIafter\fR the list of bits for the same reason.
  594. X.sp
  595. XMessage lists can be piped to the
  596. X.B flags
  597. Xcommand; for example, you may use
  598. X.sp
  599. X.nf
  600. X.ti +4
  601. Xcmd r 'flags \\!* + r | reply'
  602. X.fi
  603. X.sp
  604. Xto mark as
  605. X.I replied-to
  606. Xall messages included in a reply.
  607. X.TP
  608. X.BR folder " [\-N] [-n] [\-r] [ %[user] | # | & | file ]"
  609. X.RB ( fo )
  610. XChange current folder.
  611. XWith no arguments, prints the name of the current folder.
  612. XThe arguments are:
  613. X.nf
  614. X.ta 1i
  615. X.in +2
  616. X\-N    No headers are displayed upon entering new folder
  617. X\-n    The current folder is not updated
  618. X\-r    Set Read-Only mode (can't alter new folder)
  619. X%[user]    Change to /usr/spool/mail/[user] (default is yours)
  620. X#    Switch back to the previous folder
  621. X&    Change folder to $mbox (default is ~/mbox)
  622. X.in -2
  623. X.fi
  624. X.sp
  625. XFile names that do not begin with `/' are interpreted relative to the current
  626. Xdirectory unless they begin with one of the metacharacters `+' or `~'.
  627. XAs in
  628. X.IR csh ,
  629. Xthe character `~' expands to the user's home directory (or to some other
  630. Xuser's home directory if used as \*Q~username\*U).
  631. XThe character `+' is expanded to the name of the user's
  632. X.I folder
  633. Xdirectory (defaults to \*Q~/Mail\*U or the value of the variable
  634. X.BR folder ).
  635. XFor compatibility with other mailers, no `/' character needs to appear
  636. Xbetween the `+' and the name of the folder (see \*QFilename metacharacters\*U
  637. Xin the LINE-MODE INTERFACE section).
  638. X.sp
  639. XThis command can only appear in a pipeline if it is the first command;
  640. Xit returns a list of all the messages in the new folder.
  641. XThis command cannot be used in initialization files before the shell
  642. Xhas started.
  643. X.sp
  644. XFor compatibility with older versions, the argument `!' with
  645. Xno leading `\-' is interpreted as \-n.
  646. X.TP
  647. X.B folders
  648. XList the names of the folders in your folder directory.
  649. XYour folder directory is the directory
  650. X.I Mail
  651. Xin your home directory.
  652. XOr, you can set the variable
  653. X.B folder
  654. Xto specify another folder directory.
  655. X.br
  656. X.TP
  657. X.BR from " [ + | \- ] [msg-list] [pattern]"
  658. X.RB ( f )
  659. XWith no arguments,
  660. X.B from
  661. Xwill print the current message's header summary (see the variable
  662. X.BR hdr_format ).
  663. XIf given a pattern,
  664. X.B from
  665. Xwill print the headers of those messages whose \*QFrom:\ \*U lines
  666. Xmatch the pattern.
  667. XWhen a message list precedes the pattern, or when a message list is
  668. Xsupplied by a pipeline, the search is restricted to that list.
  669. XIf only a message list is given (or piped),
  670. X.B from
  671. Xwill print the headers of the listed messages.
  672. X.sp
  673. XThe special arguments `\-' and `+' can be given to move the
  674. Xcurrent message pointer to the previous or next message,
  675. Xrespectively, while also printing that message's header.
  676. XIf a message list was given in addition to `\-' or `+', then
  677. Xthe current message pointer will be set to the first or last
  678. Xmessage, respectively, in the message list given.
  679. XExamples:
  680. X.sp
  681. X.ti +2
  682. Xfrom + Dan
  683. X.sp
  684. Xwill print the headers of all messages that contain \*QDan\*U in
  685. Xin the author's name and set the current message pointer to
  686. Xthe last one of that kind in the list.
  687. X.sp
  688. X.ti +2
  689. Xfrom \- 10-30 {16}
  690. X.sp
  691. Xwill print the headers of messages 10 through 30 except for
  692. Xmessage 16 and set the current message pointer to 10.
  693. X.sp
  694. X.ti +2
  695. Xfrom +
  696. X.sp
  697. Xwill print the header of the message after the current message
  698. Xand increment the current message pointer to the next message.
  699. X.sp
  700. X.ti +2
  701. Xfrom $
  702. X.sp
  703. Xwill print the last message's header and not move the current
  704. Xmessage pointer.
  705. X.TP
  706. X.BR headers " [ [\-H][:c] ] [ + | \- ]"
  707. X.RB ( h ,
  708. X.BR z )
  709. XPrints a screenful of message headers listed in the
  710. Xcurrent folder.
  711. XIf a message number is given on the command line,
  712. Xthe first message of the screenful of messages will be
  713. Xthat message number.
  714. XThe `z' command is identical to the \*Qh +\*U
  715. Xcommand and remains for compatibility reasons.
  716. XThe variable
  717. X.B screen
  718. Xmay be set to tell how many headers are in a screenful.
  719. XIn the graphics tool mode, the variable
  720. X.B screen_win
  721. Xcontains the number of headers used in the headers subwindow.
  722. X.sp
  723. XA typical header may look like:
  724. X.sp
  725. X.ti +2
  726. X5 >N  argv@spam.istc.sri.com Feb 19, (10/278) Test
  727. X.sp
  728. XThis line indicates that it is message number 5 and the
  729. X.I >
  730. Xindicates that the \*Qcurrent message pointer\*U is pointing to this
  731. Xmessage.
  732. XThe next two positions indicate the message status.
  733. XThe first
  734. Xmay be one of, \*QN\*U (new and unread), \*QU\*U (old, but still
  735. Xunread), \*Q*\*U (deleted), \*QS\*U (saved), \*QP\*U (preserved),
  736. Xor \*Q \*U (read).
  737. XThe second position may have an \*Qr\*U if the message
  738. Xhas been replied to.
  739. X.sp
  740. XThe author of the example message header is
  741. X.IR argv@spam.istc.sri.com ,
  742. Xthe date is
  743. X.IR "Feb 19" ,
  744. Xthe number of lines in the message is
  745. X.IR 10 ,
  746. Xthe number of characters is
  747. X.I 278
  748. Xand the subject of the message is
  749. X.IR Test .
  750. XThe format of the message header shown here is described by
  751. Xthe string variable
  752. X.BR hdr_format .
  753. XThe example given above has a hdr_format of
  754. X.sp
  755. X.ti +2
  756. Xset hdr_format = "%25f %7d (%l/%c) %25s"
  757. X.sp
  758. XSee the description of
  759. X.B hdr_format
  760. Xin the VARIABLES section for more information on header formats.
  761. X.sp
  762. XYou can print a special subset of message headers by using the
  763. X.I \-H:c
  764. Xoption, where `c' is one of:
  765. X.nf
  766. X.in +2
  767. X.ta 1i
  768. X.if t .ta 1.5i
  769. Xa       all messages
  770. Xd       deleted messages
  771. Xn       new messages
  772. Xo       old messages
  773. Xr       replied to messages
  774. Xs       saved messages
  775. Xu       unread messages
  776. X.fi
  777. X.in -2
  778. XNote that the \-H is not required; \*Qheaders :c\*U is valid.
  779. X.sp
  780. XMore options to the
  781. X.B headers
  782. Xcommand include
  783. X.RI ` + '
  784. Xand
  785. X.RI ` \- '.
  786. XEach will print the next or previous screenful of message headers.
  787. XThe
  788. X.B z
  789. Xcommand can also be used; `z' alone will print the next
  790. Xscreenful (thus, the `+' is optional)
  791. Xand \*Qz \-\*U is equivalent to \*Qh \-\*U.
  792. X.sp
  793. XHeaders affects all the messages it displays, so piping may be done
  794. Xfrom the headers command.
  795. XPiping to the headers command causes the
  796. Xmessage headers affected by the previous command to be printed.
  797. XThis action is identical to piping to the
  798. X.B from
  799. Xcommand.
  800. X.TP
  801. X.BR help " [topic]"
  802. XHelp is provided on a per topic basis and on a general basis.
  803. XFor general help, just typing
  804. X.I help
  805. Xwill provide some general information as to how to get further help
  806. Xand a list of topics suggested for more specific help.
  807. XThere is also help provided for each command by using the \-?
  808. Xoption to most commands.
  809. XThis option will provide command line usage information as well as a
  810. Xdescription of what the command does and how to use it.
  811. X.sp
  812. XIf no help file is found, an error message will be printed.
  813. XThe location of the help files may be reset by setting the variables
  814. X.B cmd_help
  815. Xand
  816. X.B tool_help
  817. Xto the paths of the new help files.
  818. X.sp
  819. XThe
  820. X.B tool_help
  821. Xvariable is recognized only by versions capable of using suntool mode
  822. X(tool mode need not be active).
  823. X.TP
  824. X.BR history " [\-h] [\-r] [N]"
  825. XThis command displays the command history in chronological order; early
  826. Xcommands are printed first followed by more recent commands displayed last.
  827. XOption
  828. X.I \-h
  829. Xsuppresses printing of history event numbers with each history command.
  830. XOption
  831. X.I \-r
  832. Xreverses the order of the history events displayed.
  833. X.sp
  834. XIf a number
  835. X.I N
  836. Xis given, then that number of previous commands is
  837. Xechoed rather than the number set by the variable
  838. X.BR history .
  839. X.sp
  840. XSee the LINE-MODE INTERFACE section for a description of referencing the
  841. Xhistory in commands.
  842. X.TP
  843. X.BR ignore / unignore " [header-list]"
  844. XDisplay or set a list of headers to be ignored when displaying messages.
  845. XWhen reading messages, all the message headers are displayed with the text
  846. Xbody of the message.
  847. XSince these message identifier fields are cumbersome and uninteresting
  848. Xin many cases, you can filter out unwanted headers by using this command.
  849. XFor example,
  850. X.sp
  851. X.ti +2
  852. Xignore Received Date Message-Id
  853. X.sp
  854. Xwill ignore the three specified fields.
  855. XAdditional
  856. X.B ignore
  857. Xcommands are cumulative.
  858. XThe command
  859. X.B unignore
  860. Xis used to reverse the effects of
  861. X.BR ignore .
  862. X.sp
  863. XFor another way to control this, see the variable
  864. X.BR show_hdrs .
  865. X.TP
  866. X.BR lpr " [-h] [-n] [\-Pname] [msg-list]"
  867. XTakes a message list and sends those messages, one by one, to the printer,
  868. Xeach separated by page feeds.
  869. XThe \-h option suppresses printing of ignored headers (see the
  870. X.B ignore
  871. Xcommand and the variables
  872. X.B show_hdrs
  873. Xand
  874. X.BR alwaysignore ),
  875. Xand the \-n option suppresses all headers.
  876. XA default printer name is supplied if one is not specified on the
  877. Xcommand line
  878. X.RI (\-P printer-name ).
  879. XIf you have the variable
  880. X.B printer
  881. Xset, that printer name will be used.
  882. X.sp
  883. XIf the variable
  884. X.B print_cmd
  885. Xis set, the command described by that variable will be used instead
  886. Xof the default system command.
  887. XIn such cases, the -P option and the
  888. X.B printer
  889. Xvariable are ignored and the command is simply executed as is.
  890. X.sp
  891. XThe \*Qprinted\*U status bit is set for each message printed by this command.
  892. X.TP
  893. X.BR ls " [flags]"
  894. XThis command duplicates the
  895. X.IR UNIX (TM)
  896. Xcommand
  897. X.I /bin/ls.
  898. XBy default,
  899. X.I ls
  900. Xalways uses the -C flag (columnate output).
  901. X.TP
  902. X.BR mail " [flags] [recipient ...]"
  903. X.RB ( m )
  904. XSend mail to a list of users.
  905. XIf no recipient list is specified on the
  906. X.I Mush
  907. Xcommand line, then a \*QTo: \*U prompt will request one.
  908. XA list of recipients must be supplied at some time before the message is
  909. Xsent, but is not required to begin composing a letter.
  910. XThis implementation of
  911. X.I Mush
  912. Xsupports mailing to files and programs as recipients.
  913. XFilenames must be full pathnames; thus, they must start with a `/' or there
  914. Xis no way to know whether a recipient is a pathname or a user name.
  915. XThe special characters `+' and `~' may precede pathnames since they are
  916. Xexpanded first to the user's folder directory (+), as described by the variable
  917. X.BR folder ,
  918. Xand the user's home directory (~).
  919. XMailing to programs is indicated by the pipe `|' character preceding the
  920. Xprogram name.
  921. XSince the user's path is searched, full pathnames are not required for
  922. Xprograms that lie in the user's PATH environment variable.
  923. X.sp
  924. XExample:
  925. X.sp
  926. X.ti +2
  927. Xmail username, /path/to/filename, "|program_name", +folder_name, ~user/mbox
  928. X.sp
  929. XOptions are:
  930. X.nf
  931. X.in +2
  932. X.if n .ta 1.5i
  933. X.if t .ta 1.8i
  934. X\-b addr-list    set list of blind carbon recipients
  935. X\-c addr-list    set list of carbon copy recipients
  936. X\-E    edit outgoing message headers
  937. X\-e    immediately enter editor (autoedit)
  938. X\-F    add random fortune to the end of message
  939. X\-f [msg-list]    forward messages (not indented)
  940. X\-H file    read file as prepared text (no headers)
  941. X\-h file    read file as a draft (text and headers)
  942. X\-I [msg-list]    include messages with headers (indented)
  943. X\-i [msg-list]    include messages in letter (indented)
  944. X\-s [subject]    prompt for subject [set subject explicitly]
  945. X\-U    send draft immediately (use only with \-h)
  946. X\-u    unsigned: no signatures or fortunes added
  947. X\-v    verbose (passed to mail delivery program)
  948. X.in -2
  949. X.fi
  950. X.sp
  951. XThe verbose option may not be available depending on the mail transport
  952. Xagent on your system.
  953. X.sp
  954. XThe \-e flag causes you to enter the editor described by the variable
  955. X.BR visual .
  956. X.sp
  957. XThe \-E flag causes
  958. X.I Mush
  959. Xto place the headers of the outgoing message in
  960. Xthe editor file so they can be changed.
  961. XSee the description of the variable
  962. X.B edit_hdrs
  963. Xfor details.
  964. X.sp
  965. XThe \-i flag will include the current message into the body of the
  966. Xmessage you are about to send.
  967. XThe included message is indented by
  968. Xthe string \*Q> \*U or by the string described by the variables
  969. X.BR indent_str ,
  970. X.BR pre_indent_str ,
  971. Xand
  972. X.BR post_indent_str .
  973. XSee the VARIABLES section for more information on these string values.
  974. XIf a message list is given after the \-i option, then the messages
  975. Xdescribed by that list are included.
  976. XThe \-I option is identical to the \-i option except that the headers of
  977. Xthe message are also included.
  978. X.sp
  979. XThe \-s flag looks at the next argument and sets the subject to that
  980. Xstring.
  981. XIf the string is to contain spaces, enclose the entire subject
  982. Xin quotes.
  983. XIf there is no following argument, then the subject will
  984. Xbe prompted for.
  985. XThis flag is useful if the user:
  986. X.sp
  987. X.in +2
  988. X.nf
  989. X\(bu does not have the variable \fBask\fR set, or
  990. X\(bu wishes to change the subject used with \fBreply\fR
  991. X.in -2
  992. X.fi
  993. X.sp
  994. XThe subject is not prompted for and is ignored completely if the \-f flag
  995. Xis specified (see below).
  996. X.sp
  997. XThe \-f flag is for message forwarding only.
  998. XAn optional message list can be given just as the -i option has.
  999. XThe forward option does not allow you to edit the message(s) being forwarded
  1000. Xunless the -e flag is also specified.
  1001. XThe subject of the message (if available) is the same as the
  1002. X.I current
  1003. Xmessage; it is not necessarily the subject of the message being forwarded.
  1004. XThe subject of forwarded mail cannot be changed.
  1005. XHowever, using the \-e flag
  1006. Xwill allow the user to change the subject once in editing mode either by
  1007. Xusing the escape sequence, \*Q~s\*U, or by editing the \*QSubject:\*U header.
  1008. X.sp
  1009. XForwarded mail that has not been edited by the user will contain special
  1010. Xheaders such as
  1011. X.sp
  1012. X.ti +2
  1013. XResent-To:
  1014. X.ti +2
  1015. XResent-From:
  1016. X.sp
  1017. Xand perhaps others, depending on your mail transport agent.
  1018. XSendmail, for example, may add a number of other \*QResent-*\*U headers.
  1019. X.sp
  1020. XThe \-u option, meaning \*Qunsigned\*U, prevents signatures and fortunes
  1021. Xfrom being appended to the message.
  1022. XIt overrides the variables
  1023. X.B autosign
  1024. Xand 
  1025. X.BR fortune ,
  1026. Xbut will affect the \-F option only if given after it on the command line.
  1027. X.sp
  1028. XThe \-h option indicates that the given file is a previously prepared
  1029. Xmessage, possibly a partial one saved with \*Q~w\*U.
  1030. XSuch a file is called a \fIdraft\fR.
  1031. XThe file argument must be given, and
  1032. Xin the current implementation
  1033. Xall message headers must either be
  1034. Xpresent in the file or must be added manually by the user.
  1035. XAt minimum, there must be a \*QTo:\*U header;
  1036. X.I Mush
  1037. Xwill add \*QFrom:\*U and \*QDate:\*U headers when sending, if necessary.
  1038. XTo read a prepared text file that does not contain headers, use \-H.
  1039. XIf the \-U option is also given, then the letter is sent immediately without
  1040. Xfurther editing.
  1041. X.sp
  1042. X.TP
  1043. X.BR map [ ! "] [string [expansion]]"
  1044. X.ns
  1045. X.TP
  1046. X.BR unmap [ ! "] string"
  1047. X.rs
  1048. XThe
  1049. X.B map
  1050. Xcommand creates or lists macros for the line mode interface, and the
  1051. X.B map!
  1052. Xcommand creates or lists macros for the message composition mode.
  1053. XIn either mode, macros act in such a way that, when
  1054. X.I string
  1055. Xis typed, the effect is the same as if
  1056. X.I expansion
  1057. Xhad been typed instead.
  1058. XThe
  1059. X.I string
  1060. Xis usually one or two control characters, or a sequence sent by
  1061. Xone of the \*Qfunction keys\*U of a particular terminal.
  1062. XSee the MACROS section for the syntax used to specify the
  1063. X.I string
  1064. Xand the
  1065. X.IR expansion ,
  1066. Xand for comments on the interactions of macros in the same and in
  1067. Xdifferent modes.
  1068. X.sp
  1069. XIf no arguments are given, these commands will display the list of
  1070. Xmacros and expansions for the appropriate mode.
  1071. XIf only a
  1072. X.I string
  1073. Xis given, they will display the
  1074. X.I expansion
  1075. Xassociated with that string for the appropriate mode.
  1076. XOtherwise, they will create a macro, associating the given
  1077. X.I expansion
  1078. Xwith the specified
  1079. X.IR string .
  1080. X.sp
  1081. XLine mode macros are unset with the
  1082. X.B unmap
  1083. Xcommand, and composition mode macros are unset with the
  1084. X.B unmap!
  1085. Xcommand.
  1086. X.TP
  1087. X.BR merge " [-N] folder-name"
  1088. XMessages from the named folder are read into the current folder.
  1089. XThe header summaries of the merged messages are printed unless the \-N
  1090. Xoption is given (see the
  1091. X.B folder
  1092. Xcommand, above).
  1093. XThis command can only appear in a pipeline if it is the first command;
  1094. Xit returns a list of all the messages from the merged-in folder.
  1095. XThis command cannot be used in initialization files before the shell
  1096. Xhas started.
  1097. X.TP
  1098. X.BR my_hdr / un_hdr " [header]"
  1099. XYou can create personalized headers in your outgoing mail using this command.
  1100. X.sp
  1101. X.nf
  1102. XCommand usage:
  1103. X.in +2
  1104. X.ta 2.5i
  1105. Xmy_hdr    print all your headers
  1106. Xmy_hdr header    print value of header
  1107. Xmy_hdr header: string    set header to string
  1108. Xun_hdr header:    unset header
  1109. X.in -2
  1110. X.sp
  1111. X.fi
  1112. XTo set a header, the first argument must be a string
  1113. Xthat contains no whitespace (spaces or tabs) and must end with
  1114. Xa colon (:).
  1115. XThe rest of the command line is taken to be the
  1116. Xtext associated with the mail header specified.
  1117. XIf any quotes are used in the header and the header itself is not set in
  1118. Xquotes, then quotes should be escaped (preceded) by a backslash.
  1119. XThis holds true for semicolons, pipe characters
  1120. Xor any other metacharacter that
  1121. X.I Mush
  1122. Xmight interpret as a command line modifier.
  1123. X.sp
  1124. XIf the variable
  1125. X.B no_hdrs
  1126. Xis set, then your headers will not be added to outgoing messages,
  1127. Xbut no headers will be unset.
  1128. XThe
  1129. X.B un_hdr
  1130. Xcommand may take `*' as an argument to un_hdr everything set.
  1131. X.sp
  1132. XExample:
  1133. X.sp
  1134. X.ti +2
  1135. Xmy_hdr Phone-Number: (415) 499-8649
  1136. X.sp
  1137. X.I Mush
  1138. Xtreats the the header \*QFrom:\*U as a special case.
  1139. XIf you have set your own From:, a simple test is performed to determine
  1140. Xwhether the address given is valid.
  1141. XAny UUCP or domain address that directs mail to your login at the local
  1142. Xmachine should be acceptable, but certain configurations may prevent some
  1143. Xcombinations from being recognized.
  1144. XIf the address is valid, your From: header will be used; otherwise, an
  1145. Xaddress known to be valid will be generated and used instead.
  1146. XSome mail transport agents are \*Qpicky\*U and will not allow
  1147. X.I Mush
  1148. Xto supply a From: header; in these cases, your From: header is silently
  1149. Xremoved at send time, and replaced with one generated by the MTA.
  1150. X.sp
  1151. XNote:  You cannot set the \*QDate:\*U.
  1152. XAttempting to do so will not result in any
  1153. Xerror messages; your date will simply be overwritten
  1154. Xby the system when your mail is sent.
  1155. X.TP
  1156. X.BR pick " [flags] [<pattern>]"
  1157. XAllows the user to select particular messages from a folder.
  1158. XThe <pattern> is a \*Qregular expression\*U as described by
  1159. X.IR ed .
  1160. XIf no arguments are given, the previous expression searched for is used.
  1161. XYou can search for messages from a user, for a particular subject line,
  1162. Xbetween certain dates, and limit searches to a range of messages.
  1163. XYou can also find all messages that do not
  1164. Xmatch the same arguments mentioned above.
  1165. X.sp
  1166. X.nf
  1167. XOptions:
  1168. X.ta 1.5i
  1169. X.in +2
  1170. X+<num>    keep only the first <num> messages matched (head).
  1171. X\-<num>    keep only the last <num> messages matched (tail).
  1172. X\-ago <format>    search for messages relative to today's date.
  1173. X\-d [+|\-]date    messages sent on or [+ after] [`\-' before] date.
  1174. X\-e    take all remaining arguments to be the pattern.
  1175. X\-f    search for pattern in \*QFrom\*U field only.
  1176. X\-h header    search for pattern in specified header only.
  1177. X\-i    ignore case of letters when searching.
  1178. X\-r msg-list    search only the listed messages.
  1179. X\-s    search for pattern in \*QSubject\*U field only.
  1180. X\-t    search for pattern in \*QTo\*U field only.
  1181. X\-x    select messages that do \fInot\fR match the pattern.
  1182. X.in -2
  1183. X.fi
  1184. X.sp
  1185. XThe
  1186. X.I \-ago
  1187. Xoption can be abbreviated as
  1188. X.IR \-a .
  1189. XOnly one of \-a, \-d, \-f, \-h, \-s and \-t can be specified at once.
  1190. XEntire messages are scanned for the <pattern>
  1191. Xunless \-a, \-d, \-f, \-h, \-s or \-t is specified.
  1192. XMessages marked for deletion are also searched.
  1193. XNo patterns can be specified with the \-a or \-d options.
  1194. XThe \-x option may not be used in conjunction with
  1195. X.IR + n
  1196. X(head) and
  1197. X.IR \- n
  1198. X(tail).
  1199. X.sp
  1200. XFor the \-d option, \*Qdate\*U is of the form:
  1201. X.sp
  1202. X.ti +2
  1203. Xmonth/day/year
  1204. X.sp
  1205. Xwith an optional `\-' to specify that the messages of interest are those
  1206. Xolder than that date.
  1207. XOmitted fields of the date default to today's values.
  1208. XExamples of selecting on date:
  1209. X.nf
  1210. X.in +2
  1211. X.ta 2.0i
  1212. X.sp
  1213. Xpick \-d 4/20    on April 20, this year.
  1214. Xpick \-d \-/2/85    on or before the 2nd, this month, 1985.
  1215. Xpick \-d +5/4    on or after May 4 of this year.
  1216. Xpick \-d /    today only.
  1217. X.fi
  1218. X.in -2
  1219. X.sp
  1220. XAt least one `/' char must be used in a date.
  1221. XThere is no strong date checking; 2/30 would be considered a valid date.
  1222. X.sp
  1223. XFor the \-ago option, the format is very simple.  Specify the number of
  1224. Xdays followed by the word \*Qdays\*U, or the number of weeks followed by
  1225. Xthe word \*Qweeks\*U, and so on with months and years.  Truncation is allowed,
  1226. Xsince only the first character is examined, so all of the following are
  1227. Xequivalent:
  1228. X.sp
  1229. X.in +2
  1230. X.nf
  1231. Xpick \-ago 1 day, 2 weeks
  1232. Xpick \-ago 2Weeks 1Day
  1233. Xpick \-ago 2w,1day
  1234. Xpick \-a 2w1d
  1235. X.fi
  1236. X.in -2
  1237. X.sp
  1238. XThese examples will find all messages that are exactly 2 weeks and 1 day
  1239. Xold.  All \*Qago\*U dates collapse into \*Qday\*U time segments.  This
  1240. Xmeans that months are 30.5 days long.  If more precise date selection is
  1241. Xrequired, use the \-d option and specify specific dates.
  1242. X.sp
  1243. XAlso note that the \-ago option allows
  1244. Xthe \*Qbefore\*U (\-) and \*Qafter\*U (+)
  1245. Xarguments.  Thus, you may pick all messages older than 1 week with:
  1246. X.sp
  1247. X.ti +2
  1248. Xpick \-ago \-1 week
  1249. X.sp
  1250. XOther examples of
  1251. X.B pick:
  1252. X.sp
  1253. X.ti +2
  1254. Xpick \-d 2/5/86 | pick \-d \-2/5/87 | pick \-s "mail stuff" | lpr
  1255. X.sp
  1256. XWill find all the messages between the dates February 5, 1986, and
  1257. XFebruary 5, 1987, that contain the subject "mail stuff" and send them
  1258. Xto the printer.
  1259. X.sp
  1260. X.ti +2
  1261. Xpick -s Re: | delete
  1262. X.sp
  1263. XDeletes messages that have \*QRe:\*U in the Subject header.
  1264. X.sp
  1265. X.ti +2
  1266. Xfolder +project | pick \-f frank
  1267. X.sp
  1268. XFinds all messages from frank in the folder described by +project.
  1269. X.sp
  1270. X.ti +2
  1271. Xpick \-h return-path ucbvax
  1272. X.sp
  1273. XSearches all messages that have the header "Return-Path:" and determines
  1274. Xif the string \*Qucbvax\*U is in the header.
  1275. XNote that case sensitivity
  1276. Xapplies only to the pattern searched, not the header itself.
  1277. X.sp
  1278. X.ti +2
  1279. Xpick \-ago +1w | save +current
  1280. X.sp
  1281. XThis finds all messages that are a week or less old and saves them in the file
  1282. Xcalled \fIcurrent\fR, which is found in the user's \fIfolder\fR variable.
  1283. X.sp
  1284. X.ti +2
  1285. Xpick +3 mush-users
  1286. X.sp
  1287. XFinds the first three messages containing the string \*Qmush-users\*U.
  1288. X.sp
  1289. X.ti +2
  1290. Xeval -h "pick +2 \-r .-$ \-s %s" | pick \-1
  1291. X.sp
  1292. XFinds the next message with the same subject as the current message.
  1293. X.TP
  1294. X.BR pipe " [\-p pattern] [msg-list] unix-command"
  1295. XAllows the user to send the texts of a list of messages to a
  1296. X.IR UNIX (TM)
  1297. Xcommand.
  1298. XThe list of messages may either be given explicitly or may come from a
  1299. X.I Mush
  1300. Xpipeline (see \*QPiping commands\*U under the LINE-MODE INTERFACE section).
  1301. XIf a list is neither given nor piped, the current message is used.
  1302. XAll headers are considered part of the message text for purposes of this
  1303. Xcommand unless the value of the variable
  1304. X.B alwaysignore
  1305. Xincludes the word \*Qpipe\*U (see
  1306. X.B alwaysignore
  1307. Xin the VARIABLES section for more information).
  1308. XFor example,
  1309. X.sp
  1310. X.in +4
  1311. X.nf
  1312. Xpipe 3 5 7 patch
  1313. X.fi
  1314. X.in -4
  1315. X.sp
  1316. Xsends the text and headers of messages 3, 5 and 7 to the
  1317. X.I patch
  1318. Xutility.
  1319. X.sp
  1320. XIf a
  1321. X.I pattern
  1322. Xis specified with the \-p option, \fIMush\fR will search
  1323. Xthe message for a line beginning with that string.
  1324. XThe matching line and all succeeding lines will be sent to the
  1325. X.IR unix-command .
  1326. XIf \-p is not given, and the
  1327. X.I unix-command
  1328. Xis omitted, \fIMush\fR will search for a line beginning with \*Q#!\*U
  1329. Xand feed that line and all succeeding lines to \*Q/bin/sh\*U.
  1330. XThus,
  1331. X.B pipe
  1332. Xwith no arguments treats the current message as a shell script.
  1333. X.sp
  1334. XThe pattern may also be of the form
  1335. X.I /pattern1/,/pattern2/
  1336. Xin which case printing will begin with the line containing
  1337. X.I pattern1
  1338. Xand end with the line containing
  1339. X.I pattern2
  1340. X(inclusive).
  1341. XPatterns of this form must still match at beginning of line, and
  1342. Xregular expressions are not currently allowed.
  1343. X.sp
  1344. XThe
  1345. X.B pipe
  1346. Xcommand can also be invoked as
  1347. X.B Pipe
  1348. X(note capitalization), in which case only the body of the messages,
  1349. Xand none of the message headers, are sent to the unix command.
  1350. X.sp
  1351. XWhen the variable
  1352. X.B unix
  1353. Xis set,
  1354. X.IR UNIX (TM)
  1355. Xcommands can appear anywhere
  1356. X.I except as the first command
  1357. Xin a 
  1358. X.I Mush
  1359. Xpipeline without explicitly using
  1360. X.BR pipe .
  1361. XHowever, it is still necessary to specify
  1362. X.B Pipe
  1363. Xin order to exclude all headers.
  1364. X.sp
  1365. X.IR Note :
  1366. XAll messages listed as arguments to
  1367. X.B pipe
  1368. Xor
  1369. X.B Pipe
  1370. Xare sent to the standard input of the
  1371. X.I same
  1372. Xprocess as a continuous stream!  This is probably not desirable when
  1373. Xextracting shell scripts in particular, so take care.
  1374. XFuture revisions may provide an option to control this behavior.
  1375. X.TP
  1376. X.B preserve
  1377. X.RB ( pre )
  1378. XSaves a message list in your spool directory rather than
  1379. Xyour mailbox unless it has been explicitly deleted.
  1380. XThe variable
  1381. X.B hold
  1382. Xcauses all messages to be held in your spool directory automatically.
  1383. X.TP
  1384. X.B print
  1385. X.RB ( p ,
  1386. X.BR type ,
  1387. X.BR t )
  1388. XTakes a message list and displays each message on the user's terminal.
  1389. XIf the first letter of the command is a capital letter (`P' or `T')
  1390. Xthen \*Qignored\*U headers are not ignored
  1391. X.I provided
  1392. Xthat the variable
  1393. X.B alwaysignore
  1394. Xis either not set or is set to one of its possible values.
  1395. XIf this variable is set with no value, the ignored headers will be
  1396. Xignored regardless of the command used to display the message.
  1397. XSee the
  1398. X.B ignore
  1399. Xcommand for more information about ignored message headers.
  1400. X.sp
  1401. XThe `+' and the `\-' keys can be used to display the \*Qnext\*U
  1402. Xand \*Qprevious\*U messages respectively.
  1403. XThe `+' key has the caveat that the
  1404. Xmessage is not paged at all and none of the messages headers are displayed.
  1405. X.TP
  1406. X.B pwd
  1407. XPrints the current working directory.
  1408. X.TP
  1409. X.B quit
  1410. X.RB ( q )
  1411. XUpdates the current folder and exits from
  1412. X.IR Mush .
  1413. XIf the variable \*Qhold\*U is set, all messages not marked for deletion are
  1414. Xsaved in the spool directory.
  1415. XOtherwise, messages that have been read are saved to
  1416. X.I ~/mbox
  1417. Xor to the file described by the string variable
  1418. X.BR mbox .
  1419. XMessages marked for deletion are discarded.
  1420. XUnread messages go back to the spool directory in all cases.
  1421. X.TP
  1422. X.BR reply / replyall " [msg-list] [-r path] [flags] [users]"
  1423. X.RB ( r / R )
  1424. XMessages are replied to by sending mail to the sender of each message
  1425. Xin the given message list.
  1426. XThe command
  1427. X.B replysender
  1428. Xis equivalent to
  1429. X.BR reply .
  1430. X.B Replyall
  1431. Xresponds to all the recipients as well as the sender of the message.
  1432. XThese commands understand all the same flags as the
  1433. X.B mail
  1434. Xcommand.
  1435. X.sp
  1436. XWhen constructing a return mail address to the author of a message,
  1437. X.B reply
  1438. Xsearches for special mail headers in the author's message that
  1439. Xindicate the most efficient mail path for return mail.
  1440. X.I Mush
  1441. Xwill search for the \*QReply-To:\*U, \*QReturn-Path:\*U,
  1442. Xand \*QFrom:\*U headers, in that order, by default.
  1443. X.sp
  1444. XIf none of these fields are found in the message, the first line of the
  1445. Xmessage is parsed if possible;
  1446. Xthis \*QFrom\ \*U line is different from the \*QFrom:\ \*U line.
  1447. XIf the user wishes to change the order or the actual fields to search for
  1448. Xreturn paths, then the variable
  1449. X.B reply_to_hdr
  1450. Xmay be set to a list of headers to be used (in the order specified).
  1451. XIf it is set, but has no value, the first \*QFrom\ \*U line is used
  1452. Xregardless of what headers the author's message contains.
  1453. XThe \*QFrom\ \*U line may be specified explicitly as an item in the
  1454. Xlist of reply-to headers by specifying the header:
  1455. X.B From_.
  1456. XSee the VARIABLES section for more information about
  1457. X.B reply_to_hdr.
  1458. X.sp
  1459. XWhen replying to all recipients of the message using the
  1460. X.B replyall
  1461. X.RB ( R )
  1462. Xcommand, only the original author's address can be obtained from
  1463. Xthe message headers.
  1464. XThere is no way to determine the best path to the
  1465. Xother recipients of the message from message headers aside from taking
  1466. Xtheir addresses directly from the \*QTo:\*U and \*QCc:\*U lines.
  1467. X.sp
  1468. XExample:
  1469. X.sp
  1470. X.ti +2
  1471. Xreplyall 3,4,5 -i 4,5 7 -s response mail-group
  1472. X.sp
  1473. XHere, messages 3, 4 and 5 are replied to (all the authors are obtained
  1474. Xfrom each of those messages as well as the recipients from those messages)
  1475. Xand the text from messages 4, 5 and 7 are included in the body of the reply.
  1476. XThe subject is set to "response" and the alias mail-group is appended to
  1477. Xthe list of recipients for this message.
  1478. X.sp
  1479. XThe -r flag will prepend the path to each recipient in the address list
  1480. Xwith the indicated path.  This overrides the value of \fBauto_route\fR,
  1481. Xbut has the exact same functionality.  See the explanation of the variable
  1482. Xin the VARIABLES section.  Also see the MAIL ADDRESSES section for more
  1483. Xinformation concerning replying to messages.
  1484. X.nf
  1485. X.TP
  1486. X.BR save / write / copy " [\-f] [\-s | \-a] [msg-list] [filename / directory]"
  1487. X.fi
  1488. X.RB ( s / w )
  1489. XWith no arguments,
  1490. X.B save
  1491. Xand
  1492. X.B write
  1493. Xwill save the current message to the file
  1494. X.I mbox
  1495. Xin the user's home directory (or the file specified by the
  1496. X.B mbox
  1497. Xvariable).
  1498. XIf a message list is given, then the messages specified by
  1499. Xthe list are saved.
  1500. XIf a filename is given, then that filename is used instead of mbox.
  1501. XThe \-s options forces the filename used to be that of the subject of
  1502. Xthe message.  Similarly, the \-a option causes the filename used to be
  1503. Xthat of the author of the message being saved.  If more than one message
  1504. Xis being saved, the subject or author name used is that of the smallest
  1505. Xmessage number (since message lists have no order of precedence).  With
  1506. Xthese two options, a directory name may be given to specify a directory
  1507. Xother than the current directory.
  1508. X.sp
  1509. XIf the file exists and is writable, the specified command
  1510. Xwill append each message to the end of the file.
  1511. XIf \-f is given, then the file is overwritten causing whatever contents it
  1512. Xcontains to be lost.
  1513. XFor compatibility with older versions, the character `!' may be substituted
  1514. Xfor \-f (no `\-' is used with `!').
  1515. XIf the current folder is the system mailbox, then saved messages are
  1516. Xmarked for deletion when the user exits using the
  1517. X.B quit
  1518. Xcommand.
  1519. XIf the variable
  1520. X.I keepsave
  1521. Xis set or the current folder is not the system mailbox, then messages are
  1522. Xnot marked for deletion.
  1523. X.sp
  1524. XThe
  1525. X.B write
  1526. Xcommand differs from
  1527. X.B save
  1528. Xand
  1529. X.B copy
  1530. Xin that the message headers are
  1531. X.I not
  1532. Xsaved in the file along with the body of text.
  1533. XThe
  1534. X.B copy
  1535. Xcommand is is like
  1536. X.B save
  1537. Xexcept that messages are never marked for deletion, whether or not
  1538. X.B keepsave
  1539. Xis set.
  1540. X.sp
  1541. XBecause message lists are used to determine the messages to be saved,
  1542. Xif the user wishes to save messages to a file that begins with a digit
  1543. Xor any other message list metacharacter, a backslash should precede
  1544. Xthe filename to escape the message list expansion routine.
  1545. XThe backslash will not become a part of the filename.
  1546. X.TP
  1547. X.BR saveopts " [file]"
  1548. XThe complement of
  1549. X.BR source ,
  1550. X.BR saveopts ,
  1551. Xwill save all settable variables, aliases
  1552. Xand cmd's in the initialization file.
  1553. X(See the INITIALIZATION
  1554. Xsection for more information on initialization files.)
  1555. XIf an argument is given, that file is used.
  1556. XBeware that this will overwrite files, so any \*Qif\*U expressions
  1557. Xwill be lost, as will settings that have changed since entering
  1558. X.IR Mush .
  1559. XUsing saveopts is highly discouraged
  1560. Xand is intended for the naive user only.
  1561. X.TP
  1562. X.BR set " [[?]variable [= value]]"
  1563. X.ns
  1564. X.TP
  1565. X.BR unset " variable"
  1566. X.rs
  1567. XWith no arguments,
  1568. X.B set
  1569. Xprints all variable values.
  1570. XOtherwise, it sets the named
  1571. X.IR variable .
  1572. XArguments are of the form \*Qvariable=value\*U (whitespace is allowed).
  1573. XBoolean options such as
  1574. X.I autoedit
  1575. Xneed not have \*Q=value\*U associated in the command.
  1576. XMultivalued variables are set in the same way as other variables, and
  1577. Xthe list of values should be enclosed in quotes if whitespace is used
  1578. Xto separate the items.
  1579. XSee the VARIABLES section for details of the format of each type of variable.
  1580. X.sp
  1581. XThe special command
  1582. X.sp
  1583. X.ti +2
  1584. Xset ?all
  1585. X.sp
  1586. Xwill print all known variables utilized by the program and a brief
  1587. Xdescription of what they do.
  1588. XThe user may set and manipulate his own set of variables, but internal
  1589. Xvariables that are utilized by the program are the only ones displayed.
  1590. X.sp
  1591. XThe command
  1592. X.sp
  1593. X.ti +2
  1594. Xset ?variable_name
  1595. X.sp
  1596. Xwill print the same information for one variable instead of all variables.
  1597. XYou may unset everything by issuing the command \*Qunset *\*U.
  1598. X.sp
  1599. XIt is possible to set a variable to a list of messages returned by another
  1600. Xcommand by using the piping mechanism.  For example,
  1601. X.sp
  1602. X.ti +2
  1603. Xpick \-s Status Reports | set reports
  1604. X.sp
  1605. XThe variable
  1606. X.I reports
  1607. Xnow contains a message list which can be used
  1608. Xas the message list argument to any command which accepts a list.
  1609. X.sp
  1610. X.ti +2
  1611. Xmail \-i $reports boss
  1612. X.sp
  1613. XThis command will mail to \*Qboss\*U and include the text of all the
  1614. Xmessages held in the \fIreports\fP variable.
  1615. X.TP
  1616. X.BR sh " [command]"
  1617. XInvokes an interactive version of the shell.
  1618. XThe shell spawned is described by the variable
  1619. X.BR shell .
  1620. XIf the optional argument
  1621. X.I command
  1622. Xis given, then that command is executed under the Bourne Shell.
  1623. XIf the special character `&' is at the end of any shell command,
  1624. Xthen the command will be executed in background.
  1625. X.TP
  1626. X.BR source " [file]"
  1627. XRead
  1628. X.I Mush
  1629. Xcommands from a file.
  1630. XIf no filename is specified, the files searched
  1631. Xfor are .mushrc or .mailrc in the user's home directory.
  1632. XIf the environment variable
  1633. X.I MUSHRC
  1634. Xor
  1635. X.I MAILRC
  1636. Xis set, then the file named by the variable is sourced instead.
  1637. XIf a filename is given on the command line, that file is sourced.
  1638. XSee the INITIALIZATION heading and the
  1639. X.B home
  1640. Xvariable descriptions for more information.
  1641. X.TP
  1642. X.BR sort " [\-i] [[\-r] \-a | \-d | \-l | \-R | \-s | \-S]"
  1643. XThis command will sort messages according to author, date, status or subject
  1644. X(with or without considering the \*QRe: \*U, in replied messages).
  1645. XIn addition, the messages can be sorted in reverse order (same arguments).
  1646. X.sp
  1647. X.nf
  1648. XOptions:
  1649. X.in +2
  1650. X.ta 1i
  1651. X\-i    ignore case in alphabetical sorts
  1652. X\-r    reverse sort order of next option
  1653. X\-a    sort by author (alphabetical)
  1654. X\-d    sort by date
  1655. X\-l    sort by length of message
  1656. X\-R    sort by subject including \*QRe:\*U
  1657. X\-s    sort by subject (alphabetical)
  1658. X\-S    sort by message status
  1659. X.in -2
  1660. X.fi
  1661. X.sp
  1662. XBy default (no arguments),
  1663. X.B sort
  1664. Xsorts messages by
  1665. X.IR status .
  1666. XNew, unread messages are first, followed by preserved messages,
  1667. Xand finally deleted messages are placed at the end of the list.
  1668. XIf \-r is the only option given, the status ordering is reversed.
  1669. X.sp
  1670. XWhen sorting by date, the boolean variable
  1671. X.B date_received
  1672. Xis checked.  If it is set, then sorting goes by date received.
  1673. XOtherwise (default), sorting is by date sent by the original author.
  1674. X.sp
  1675. XIf more than one sort option is specified, they will be applied in
  1676. Xleft-to-right sequence to each comparison.
  1677. XThus:
  1678. X.sp
  1679. X.ti +2
  1680. Xsort \-a \-d
  1681. X.sp
  1682. Xsorts messages by author and, if the author of any set of messages
  1683. Xis the same, sorts within that set by date.
  1684. XNote that the \-r option applies to only one other option at a time;
  1685. Xto reverse the sort of both author and date requires:
  1686. X.sp
  1687. X.ti +2
  1688. Xsort \-r \-a \-r \-d
  1689. X.sp
  1690. XThe options can also be grouped:
  1691. X.sp
  1692. X.ti +2
  1693. Xsort \-ra \-rd
  1694. X.ti +2
  1695. Xsort \-rard
  1696. X.sp
  1697. XCurrently, only the line mode interface supports multiple sort criteria,
  1698. Xbut the other interfaces allow subsorting indirectly
  1699. Xwhen appropriate actions are taken, as discussed below.
  1700. X.sp
  1701. XIt is also possible to sort a consecutive sublist of messages by using pipes.
  1702. END_OF_FILE
  1703. if test 50595 -ne `wc -c <'mush/mush.1.b'`; then
  1704.     echo shar: \"'mush/mush.1.b'\" unpacked with wrong size!
  1705. fi
  1706. # end of 'mush/mush.1.b'
  1707. fi
  1708. echo shar: End of archive 3 \(of 19\).
  1709. cp /dev/null ark3isdone
  1710. MISSING=""
  1711. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  1712.     if test ! -f ark${I}isdone ; then
  1713.     MISSING="${MISSING} ${I}"
  1714.     fi
  1715. done
  1716. if test "${MISSING}" = "" ; then
  1717.     echo You have unpacked all 19 archives.
  1718.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1719. else
  1720.     echo You still need to unpack the following archives:
  1721.     echo "        " ${MISSING}
  1722. fi
  1723. ##  End of shell archive.
  1724. exit 0
  1725.  
  1726.  
  1727.