home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume12 / mush / part03 < prev    next >
Encoding:
Text File  |  1990-05-05  |  55.3 KB  |  1,734 lines

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