home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / source / mush.lzh / mush.8 < prev    next >
Text File  |  1990-05-06  |  56KB  |  1,534 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 8 (of 19)."
  10. # Contents:  mush/fkeys.c mush/mush.1.d mush/tool_help
  11. # Wrapped by argv@turnpike on Wed May  2 13:59:28 1990
  12. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  13. if test -f 'mush/fkeys.c' -a "${1}" != "-c" ; then 
  14.   echo shar: Will not clobber existing file \"'mush/fkeys.c'\"
  15. else
  16. echo shar: Extracting \"'mush/fkeys.c'\" \(1717 characters\)
  17. sed "s/^X//" >'mush/fkeys.c' <<'END_OF_FILE'
  18. X/* @(#)fkeys.c        (c) copyright 10/18/86 (Dan Heller) */
  19. X
  20. X#include "mush.h"
  21. X
  22. X#define L(n)        KEY_LEFTFIRST+(n)-1
  23. X#define R(n)        KEY_RIGHTFIRST+(n)-1
  24. X#define F(n)        KEY_TOPFIRST+(n)-1
  25. X#define BREAK_KEY    KEY_TOPLAST
  26. X
  27. Xstatic int func_key();
  28. X
  29. XNotify_value
  30. Xfkey_interposer(client, event, arg, type)
  31. XFrame client;
  32. XEvent *event;
  33. XNotify_arg arg;
  34. XNotify_event_type type;
  35. X{
  36. X    if ((event_is_key_left(event) || event_is_key_right(event) ||
  37. X    event_is_key_top(event)) &&
  38. X    event_is_down(event) && func_key(event_id(event)))
  39. X        return NOTIFY_DONE;
  40. X
  41. X    return notify_next_event_func(client, event, arg, type);
  42. X}
  43. X
  44. X/*
  45. X * Execute commands defined by a function key.
  46. X * Left keys:
  47. X * L1 = (null)  can't be set
  48. X * L2 ... L10
  49. X * Top function keys
  50. X * F1 ... F9, BREAK/backspace (key not definable)
  51. X * Right function keys
  52. X * R1 ... R15
  53. X * Usually, the last Function key displays the others' settings.
  54. X */
  55. Xstatic int
  56. Xfunc_key(key)
  57. Xregister int key;
  58. X{
  59. X    register char **argv, *p;
  60. X    char buf[256];
  61. X    int n;
  62. X
  63. X    if (key >= KEY_LEFTFIRST && key <= KEY_LEFTLAST)
  64. X    buf[0] = 'L', n = key - KEY_LEFTFIRST;
  65. X    else if (key >= KEY_TOPFIRST && key <= KEY_TOPLAST)
  66. X    buf[0] = 'F', n = key - KEY_TOPFIRST;
  67. X    else if (key >= KEY_RIGHTFIRST && key <= KEY_RIGHTLAST)
  68. X    buf[0] = 'R', n = key - KEY_RIGHTFIRST;
  69. X    (void) sprintf(buf+1, "%d", n+1);
  70. X
  71. X    if (!(p = do_set(fkeys, buf))) {
  72. X    if (!chk_option("quiet", "fkey"))
  73. X        wprint("Function key \"%s\" not set.\n", buf);
  74. X    return FALSE;
  75. X    }
  76. X    /* make_command will screw up "p", so copy it first */
  77. X    (void) strcpy(buf, p);
  78. X    Debug("(%s) \"%s\": ", key, p), turnon(glob_flags, CONT_PRNT);
  79. X    if (argv = make_command(buf, TRPL_NULL, &n))
  80. X    (void) do_command(n, argv, msg_list);
  81. X    return TRUE;
  82. X}
  83. END_OF_FILE
  84. if test 1717 -ne `wc -c <'mush/fkeys.c'`; then
  85.     echo shar: \"'mush/fkeys.c'\" unpacked with wrong size!
  86. fi
  87. # end of 'mush/fkeys.c'
  88. fi
  89. if test -f 'mush/mush.1.d' -a "${1}" != "-c" ; then 
  90.   echo shar: Will not clobber existing file \"'mush/mush.1.d'\"
  91. else
  92. echo shar: Extracting \"'mush/mush.1.d'\" \(33714 characters\)
  93. sed "s/^X//" >'mush/mush.1.d' <<'END_OF_FILE'
  94. X.B respond
  95. Xand
  96. X.BR mail .
  97. X.TP
  98. X.B warning
  99. X(Boolean)
  100. XIf set, warning messages are printed when:
  101. X.in +4
  102. X.ti -2
  103. X\(bu A command line alias (\*Qcmd\*U) looks like a command.
  104. X.br
  105. XFor example,
  106. X.ti +2
  107. Xcmd mail 'set fortune; \\mail'
  108. X.ti +2
  109. Xcmd respond 'unset fortune; \\respond;'
  110. X.ti -2
  111. X\(bu The date format of a message is unknown.
  112. X.br
  113. XThe date of a message is taken from the \*QDate:\*U header.
  114. XIf the date on that header is unknown, other headers are searched for a
  115. Xvalid date format until a legal one is found.
  116. XThis date may not be
  117. Xcorrect in that it was the date the message was received, not sent.
  118. X.ti -2
  119. X\(bu A variable is unset without first being set.
  120. X.br
  121. XFor example, if you give the command
  122. X.ti +2
  123. Xunset metoo
  124. Xand the variable
  125. X.B metoo
  126. Xis not set, you will be notified that the variable is not defined.
  127. X.ti -2
  128. X\(bu No header can be found for a digest article.
  129. X.br
  130. XThis occurs when the
  131. X.B undigest
  132. Xcommand encounters what appears to be an article separator but cannot
  133. Xfind a \*QFrom:\*U or \*QDate:\*U header in the following text.
  134. X.in -4
  135. X.sp
  136. XThe intent is so that users who are used to their own environments
  137. Xwill be aware of changes in other environments should they be forced
  138. Xto use them.
  139. XThere may also be warning messages of failed routines
  140. Xor assertions that are not fatal enough to interrupt normal running
  141. Xof the program.
  142. X.TP
  143. X.B wrap
  144. X(Boolean)
  145. XNormally, when the last message is deleted, the current message
  146. Xpointer remains pointing to the last message and the user is done
  147. Xreviewing his mail.
  148. XIf the
  149. X.B wrap
  150. Xvariable is set, the current message pointer will wrap around to the
  151. Xbeginning of the user's messages again to the next undeleted message.
  152. XThis also applies to the
  153. X.B next
  154. Xcommand.
  155. X.TP
  156. X.B wrapcolumn
  157. X(Numeric)
  158. XMay be set to a column number at which line wrap will occur when
  159. Xcomposing messages.
  160. XIf set, but given no value, column 78 will be assumed.
  161. XWhen
  162. X.I Mush
  163. Xis able to determine the number of columns on your screen, it will
  164. Xenforce a maximum value for
  165. X.B wrapcolumn
  166. Xof two less than that number of columns.
  167. XLine wrapping can be disabled either by unsetting
  168. X.B wrapcolumn
  169. Xor by setting it with the explicit value of 0 (zero).
  170. X.sp
  171. XLine wrapping occurs only at whitespace (spaces or tabs).
  172. XLines containing no whitespace to the left of the specified column
  173. Xwill not be wrapped.
  174. XIf \fIMush\fR was started with the \-e (echo mode) option, or is in tool mode,
  175. Xline wrapping cannot be done due to I/O incompatibilities.
  176. X.PP
  177. XIn addition to the named variables described above, three special
  178. Xvariable forms are recognized.
  179. X.TP
  180. X.B $$
  181. XThis string returns the process id (PID) of the current
  182. X.I mush
  183. Xprocess.
  184. XColon modifiers are not recognized for this special variable.
  185. X.TP
  186. X.BI $[ %fmt ]
  187. XThe string \fI%fmt\fR is interpreted as a header formatting string
  188. X(as in the
  189. X.B hdr_format
  190. Xvariable) and is expanded using the headers from the current message.
  191. XColon modifiers are allowed to follow the format.
  192. XFor example,
  193. X.sp
  194. X.ti +4
  195. Xsave $[%4n]:l
  196. X.sp
  197. Xwill save the current message in a file whose name is the first four
  198. Xcharacters of the name of the author, converted to lower case.
  199. X.TP
  200. X.BI $( %c )
  201. XThe string `\fI%c\fR' is interpreted as a prompt format
  202. X(as in the
  203. X.B prompt
  204. Xvariable) and is expanded.
  205. XColon modifiers are allowed.
  206. XFor example,
  207. X.sp
  208. X.ti +4
  209. Xecho $(%T)
  210. X.sp
  211. Xwill print the current time.
  212. XNote that \*Q$(%F)\*U is equivalent to \*Q$thisfolder\*U.
  213. X.PP
  214. XNOTE:  Evaluation of many \*Q$[%...]\*U or \*Q$(%...)\*U values in a single
  215. Xcommand is inefficient.
  216. XIf expansion of several formats is desired, it is better to use the \-h
  217. Xand \-p options of
  218. X.B echo
  219. Xor
  220. X.BR eval ,
  221. Xwhich also provide better quoting of the interpolated strings.
  222. X.SH "MUSH SCRIPTS"
  223. XOne of the most useful features of
  224. X.I Mush
  225. Xis the ability to write scripts of
  226. Xcommands, which can be read by the
  227. X.B source
  228. Xcommand from within
  229. X.IR Mush ,
  230. Xor by redirecting input from the script and using the \-i option.
  231. XIf your operating system supports the \*Q#!\*U interpreter mechanism,
  232. Xa script can be even be executed as a program.
  233. XScript files can use all the usual
  234. X.I Mush
  235. Xcommands; the only restriction is
  236. Xthat the `!' history notation for referencing arguments of
  237. X.B cmd
  238. Xaliases is disabled in scripts, so only very simple
  239. X.BR cmd s
  240. Xwill work.
  241. X.PP
  242. XFor example, a filtering file, \*Qfilter\*U, might contain:
  243. X.sp
  244. X.nf
  245. X.in +2
  246. Xset newfolder = /usr/spool/mail/$USER
  247. Xif is_shell
  248. X.in +4
  249. Xif -z $newfolder
  250. X.ti +4
  251. Xset newfolder = $mbox    # mbox must be set!
  252. Xendif
  253. Xif -e $newfolder
  254. X.ti +4
  255. Xfolder $newfolder
  256. Xelse
  257. X.ti +4
  258. Xquit
  259. Xendif
  260. X.in -4
  261. Xendif
  262. X.sp
  263. Xpick -f Mailer-Daemon | save mail_errors
  264. Xpick -f yukko | delete
  265. Xpick -s -i thesis | save +thesis_mail
  266. Xpick -t unix-wizards | +wizmail
  267. Xupdate
  268. Xsort d
  269. X.in -2
  270. X.fi
  271. X.sp
  272. XThen the first command the user types when beginning a
  273. X.I Mush
  274. Xsession might be \*Qsource filter\*U, and the following would happen:
  275. X.sp
  276. X.in +2
  277. XFirst, a new variable called \fBnewfolder\fR is set to the the user's spool
  278. Xmailbox (the system mailbox).
  279. XA test is made to see if the shell is running, because the \fBfolder\fR
  280. Xcommand can only be used from the shell.
  281. XThen a test is done to see the spool mailbox is zero length, and if it is,
  282. Xthe variable is reset to the value of the user's \fBmbox\fR variable
  283. X(mbox must already be set by this time or this will fail).
  284. XA final test assures that the new folder exists.
  285. XIf it does, \fIMush\fR changes folders to the new folder.
  286. XIf it doesn't exist, the program exits (via \fBquit\fR).
  287. X.sp
  288. XOnce the correct folder has been loaded, all messages that have
  289. X\*QMailer-Daemon\*U in the From header will be saved in the file mail_errors.
  290. XThen, all mail from the user \*Qyukko\*U will simply be deleted.
  291. XNext, all mail that has in the Subject field, \*Qthesis\*U
  292. X(case ignored, so \*QThesis\*U would also match) will be
  293. Xsaved in the file $folder/thesis.
  294. XThe next command will find all messages that are addressed to
  295. Xthe group \*Qunix-wizards\*U (of which the user is an elite
  296. Xmember) and save them in the file $folder/wizmail.
  297. XLast, the folder will be updated, removing all deleted mail
  298. X(saved mail may be marked as deleted)
  299. Xand the folder is reread and sorted according to the date of the messages.
  300. X.in -2
  301. X.PP
  302. XIf the \*Q#!\*U mechanism is supported, the \*Qfilter\*U script can be
  303. Xmade into a program by adding as the first line:
  304. X.sp
  305. X.ti +4
  306. X#! /usr/local/bin/mush -F
  307. X.sp
  308. X(The actual location of
  309. X.I mush
  310. Xmay vary from system to system; /usr/local/bin is used as an example.)  Then
  311. Xmake the file executable:
  312. X.sp
  313. X.ti +4
  314. Xchmod +x filter
  315. X.sp
  316. XNow, when the command \*Qfilter\*U is typed at the user's regular shell
  317. Xprompt, the
  318. X.I mush 
  319. Xprogram will be invoked by the operating system.
  320. X.I Mush
  321. Xwill first read the commands from the \*Qfilter\*U file and perform them,
  322. Xexactly as described above, and then will continue into the usual interface.
  323. XIf it would be preferable for
  324. X.I mush
  325. Xto exit after reading the script, the first line can be changed to:
  326. X.sp
  327. X.ti +4
  328. X#! /usr/local/bin/mush -F!
  329. X.sp
  330. XThe \-F! option should also be used when running
  331. Xscripts in the background or in other circumstances where the standard
  332. Xinput cannot be a terminal, and the only commands to be executed are those
  333. Xin the script itself.
  334. X.PP
  335. XNote that any additional arguments passed to a \*Q#!\*U script are
  336. Xinterpreted by
  337. X.IR mush ;
  338. Xthey are not passed along in any way that makes them accessible to the script.
  339. XThus,
  340. X.sp
  341. X.ti +4
  342. X% filter \-f mbox
  343. X.sp
  344. Xwould apply the commands in the \*Qfilter\*U script to the \*Qmbox\*U folder.
  345. X.SH MACROS
  346. XMacros are available in several different modes in
  347. X.IR Mush .
  348. X.I "Curses mode macros"
  349. Xare created by using the
  350. X.B bind
  351. Xcommand with the special function
  352. X.B macro
  353. X(or by using
  354. X.BR bind-macro ,
  355. Xwhich is synonymous).
  356. XThese macros are effective only when the curses interface is active.
  357. X.I "Line mode macros"
  358. Xare created with the
  359. X.B map
  360. Xcommand, and are effective only in the line-oriented command interface.
  361. XFinally,
  362. X.I "composition mode macros"
  363. Xare created with the
  364. X.B map!
  365. Xcommand, and are effective only when composing mail messages.
  366. XMacros are not available in the
  367. X.I tool
  368. Xmode, nor when composing messages from the tool mode.
  369. XLine and composition mode macros are also nonfunctional when
  370. X.I Mush
  371. Xis started with the \-e (echo) option.
  372. X.PP
  373. XIn general, macros consist of two parts:  a
  374. X.I "key sequence"
  375. Xand an
  376. X.IR expansion .
  377. XThe
  378. X.B "key sequence"
  379. Xis the character or string of characters which, when typed in the
  380. Xappropriate mode, is recognized by
  381. X.I Mush
  382. Xas a reference to a macro.
  383. XThe
  384. X.B expansion
  385. Xpart of a macro is the string that will actually be \*Qseen\*U by
  386. X.I Mush
  387. Xwhen the key sequence is recognized.
  388. XMacros are like an interactive search-and-replace function;
  389. Xif a key sequence appears in the input, the associated expansion is
  390. Xsubstituted in its place.
  391. XThus, if you create a macro whose key sequence is \*Q^X^W\*U (control-X
  392. Xcontrol-W) and whose expansion is \*Qsave\*U, then when you hold down the
  393. Xcontrol key and type the two characters `x' and `w', the effect will be
  394. Xas if you had actually typed the four characters `s', `a', `v' and `e'.
  395. XThis is called \*Qexpanding\*U the macro.
  396. XMore detailed examples of macros will be presented in the subsections
  397. Xfor each mode in which macros can be used.
  398. X.PP
  399. XKey sequences are usually made up of control characters or special
  400. Xstrings of characters generated by \*Qfunction keys,\*U
  401. Xbut may in fact be almost any string the user desires.
  402. XKeys that generate a signal or an end-of-file from the keyboard
  403. X(for example, on BSD systems, control-Z generates a TSTP signal and
  404. Xcontrol-D generates an end-of-file) can never appear
  405. Xin key sequences, and macros in line or composition modes cannot
  406. X.I begin
  407. Xwith a newline, control-D, or any of the editing keys
  408. X(erase, word-erase, line-erase, etc.).
  409. XOtherwise, there are no restrictions.
  410. XIt should be kept in mind, however, that for the line and composition
  411. Xmodes, key sequences should be unusual characters or combinations of
  412. Xcharacters, not individual lower-case letters.
  413. XIf common characters or strings are used for key sequences, much
  414. Xconfusion can result when typing commands or messages.
  415. XThis is not important in the curses mode.
  416. X.PP
  417. XIn the line and composition modes, a
  418. X.I timeout
  419. Xis used for key recognition; that is, once the first character of the
  420. Xkey sequence has been typed, the succeeding characters must be typed
  421. Xafter it relatively quickly, or
  422. X.I Mush
  423. Xwill fail to recognize them as a continuous sequence.
  424. XIt is for this reason that key sequences are usually either very short,
  425. Xor are strings that are automatically generated by pressing a special
  426. Xkey on the terminal.
  427. XOn the other hand, the timeout can be used intentionally to prevent a
  428. Xmacro from being expanded; simply type the first character of the macro,
  429. Xthen wait for it to echo before typing the next.
  430. XThis does not work in curses mode, because curses macros
  431. Xnever \*Qtime out.\*U
  432. X.PP
  433. XIn any mode, macros are
  434. X.IR recursive ;
  435. Xthat is, if the
  436. X.I "key sequence"
  437. Xof one macro appears in the
  438. X.I expansion
  439. Xof another macro (or even of the same macro), the second key sequence
  440. Xwill be recognized when the first macro is expanded, and this new key
  441. Xsequence will also be expanded.
  442. XGreat care should be taken when creating macros to be certain that
  443. Xrecursive expansions do not happen unintentionally.
  444. XExpansion can be prevented in line or composition modes by using a
  445. X.I literal-next
  446. Xcharacter.
  447. X.PP
  448. XLiteral-next characters may be used from the keyboard or embedded
  449. Xin expansions.
  450. XIn either case, they prevent the next character
  451. Xfrom being interpreted as part of a key sequence.
  452. X.I Mush
  453. Xrecognizes the literal-next character from the tty settings of the
  454. Xterminal, if the \*Qnew\*U BSD-style device driver is available;
  455. Xotherwise, `^V' (control-V) is recognized as a literal-next.
  456. XNote that, if you have a tty literal-next character,
  457. Xthen when typing you will need to type
  458. X.I two
  459. Xof them in order to send one to \fIMush\fR; this is because the tty
  460. Xdriver consumes the first one.
  461. XIt is not necessary to use two literal-nexts in macro expansions
  462. Xunless you wish to cause the second literal-next to be literal.
  463. X.PP
  464. XBackslash can be used as a literal-next when typing, and can
  465. Xsometimes be used as a literal-next in expansions; but use it
  466. Xwith caution, because it also introduces escape sequences
  467. X(see \*QMacro syntax,\*U below).
  468. XThere is no literal-next mechanism for curses mode.
  469. X.PP
  470. XA macro will always abort whenever
  471. X.I any
  472. Xcommand called by the macro returns an error.
  473. XThis includes recursive expansions, so no matter how often a macro has
  474. Xrecurred, it will be terminated completely.
  475. XErrors in curses mode include illegal cursor movements, such as up from
  476. Xthe top of the screen or down from the last message.
  477. X.PP
  478. X.BR "Macro syntax" .
  479. X.PP
  480. XA special syntax is provided for specifying control characters and other
  481. Xnon-printing characters in macro key sequences and expansions.
  482. XThis syntax is the same as that for bindings, discussed in the
  483. XCURSES INTERFACE section; it can be summarized as:
  484. X.ta 1.25i
  485. X.in +2
  486. X.nf
  487. X\\CX    control-X (where X is any capital letter)
  488. X\\E    the escape character
  489. X\\n    a newline (other C-style escapes also work)
  490. X.fi
  491. X.in -2
  492. X.sp
  493. XThus, to create a line mode macro for control-X control-W, as in the
  494. Xexample above, the command would be
  495. X.sp
  496. X.ti +4
  497. Xmap '\\CX\\CW' save
  498. X.PP
  499. XAlso provided is a syntax for executing functions from within macros.
  500. XThere are two special functions that are effective in all modes;
  501. Xthese are
  502. X.I getstr
  503. Xand
  504. X.IR getline .
  505. XBoth of these functions interrupt expansion of the current macro,
  506. Xand wait for a newline-terminated string to be entered from the
  507. Xstandard input.
  508. XThis input string is inserted into the macro expansion.
  509. XThe functions differ in that
  510. X.B getline
  511. Xretains the newline character (carriage-return) at the end of the
  512. Xinput string, whereas
  513. X.B getstr
  514. Xstrips off the newline (one must still be typed to terminate input).
  515. XThese functions can be executed by surrounding their name with
  516. Xsquare brackets
  517. X.RB ( [ ,
  518. X.BR ] );
  519. Xfor example,
  520. X.sp
  521. X.ti +4
  522. Xmap '\\CX\\CW' save [getline]
  523. X.sp
  524. Xcreates a line mode macro, which is expanded when control-X control-W is
  525. Xtyped, and which displays \*Qsave\*U followed by a space and then waits
  526. Xfor the user to type a line of input; the input line will be used as the
  527. Xarguments to the save command.
  528. X.PP
  529. XAdditional functions are currently available only in the curses mode.
  530. XHowever, the syntax of enclosing the function name in square brackets
  531. Xapplies to all functions, regardless of mode.
  532. XNote that
  533. X.I ONLY
  534. Xthe function name can appear in the brackets; no whitespace is allowed.
  535. X.PP
  536. X.BR "Curses mode macros" .
  537. X.PP
  538. XMacros in curses mode are the most versatile, because they can access the
  539. Xfull range of curses commands quickly and easily.
  540. XEvery character that appears in the expansion part of a curses mode macro
  541. Xcan reference a curses command or another macro.
  542. XLike other curses functions, curses mode macros are created with the
  543. X.B bind
  544. Xcommand.
  545. XFor example, to sort your messages by date and then send the most recent
  546. Xone to the printer, you could use
  547. X.sp
  548. X.ti +4
  549. Xbind @ macro 'od$|'
  550. X.sp
  551. XWhen the `@' key is typed, this macro first invokes sort
  552. X(`o' from the default bindings) and instructs it to use date (d)
  553. Xfor sorting; it then moves the current-message pointer to the last
  554. Xmessage ($) and prints that message (|).
  555. X.PP
  556. XAdmittedly, the above macro is somewhat cryptic, and is dependent upon
  557. Xthe bindings for sort, last-msg, and lpr being set to the defaults.
  558. XIt would be better, and possibly more understandable, to refer to the
  559. Xdesired curses functions without using their key bindings.
  560. XTo allow this, the \*Q[function]\*U syntax described above may be used
  561. Xin curses mode macros to reference curses functions.
  562. XThe only function that is prohibited from appearing in the \*Q[\|]\*U
  563. Xis the special
  564. X.I macro
  565. Xfunction, which cannot be called when it has no binding.
  566. XThe example macro can therefore be rewritten as
  567. X.sp
  568. X.ti +4
  569. Xbind @ macro [sort]d[last-msg][lpr]
  570. X.sp
  571. XSuch references to curses functions may be made only in curses mode
  572. Xmacros, and are effective only when \fIMush\fR is actually in curses mode.
  573. XThat may sound strange, but the most common use of curses macros is
  574. Xto quickly perform functions that require an escape to the line mode.
  575. XFor example, although there is a variation of the curses mode
  576. X.I mail
  577. Xfunction that will prompt for additional flags, there is no function
  578. Xto prompt for flags to be passed to
  579. X.IR reply .
  580. XA macro can easily be created to provide this:
  581. X.sp
  582. X.ti +4
  583. Xbind R macro '[line-mode]reply '
  584. X.sp
  585. XThis macro binds `R' to perform an escape to line mode and type
  586. Xthe string \*Qreply\*U followed by a space.
  587. XMacro expansion then ends, leaving it up to the user to supply
  588. Xflags to the command or to backspace over it if a different command
  589. X(or none) is desired.
  590. XOf course, the macro could also have provided some default arguments:
  591. X.sp
  592. X.ti +4
  593. Xbind R macro '[line-mode]reply \-ei '
  594. X.PP
  595. XNote that, if the
  596. X.B getline
  597. Xor
  598. X.B getstr
  599. Xfunction is used in a line-mode escape, it is not possible to
  600. Xerase the text that is typed before the
  601. X.IR get ;
  602. Xthat is, if the macro had been
  603. X.sp
  604. X.ti +4
  605. Xbind R macro '[line-mode]reply \-ei [getline]'
  606. X.sp
  607. Xthen the user would be forced to use the \-ei flags.
  608. X.PP
  609. X.BR "Line mode macros" .
  610. X.PP
  611. XLine mode macros combine some of the convenience of single-keystroke
  612. Xcommands with the versatility of the line-oriented text interface.
  613. XAs has been noted, the choice of characters for line mode key sequences
  614. Xshould be made carefully, so as not to interfere with normal typing.
  615. XLine mode macros are created with the
  616. X.B map
  617. Xcommand; for example, suppose you frequently forward messages to a
  618. Xfriend named \*Qfred.\*U  You could create a macro to do this:
  619. X.sp
  620. X.ti +4
  621. Xmap '\\CF' 'mail \-f . fred\\n'
  622. X.sp
  623. XThis macro causes the single keystroke `^F' (control-F) to forward
  624. Xthe current message to \*Qfred.\*U  Note the newline
  625. Xcharacter \*Q\\n\*U at the end of the expansion;
  626. Xthis causes the command to be executed immediately,
  627. Xwithout you having to type a carriage-return.
  628. X.PP
  629. XThe expansion part of a line mode macro will echo to the screen when
  630. Xit is expanded, so you can see what the macro is doing.
  631. XYou can therefore use parts of the expansion as a \*Qprompt.\*U  In
  632. Xthe above example, suppose you wished to enter a message list rather
  633. Xthan always forwarding the current message.
  634. XChange the macro to:
  635. X.sp
  636. X.ti +4
  637. Xmap '\\CF' 'mail \-f [getstr] fred\\n'
  638. X.sp
  639. XThis version of the macro prints \*Qmail \-f\*U and a space, then waits
  640. Xfor a newline-terminated string from the standard input.
  641. XThe newline is stripped, and the string is used as the message list
  642. Xpassed to the \*Qmail \-f\*U command.
  643. XThe address \*Qfred\*U is also passed to
  644. X.BR mail ,
  645. Xso the messages in the list are forwarded to fred.
  646. X.PP
  647. XIf you want to be able to \*Qchange your mind\*U after starting a
  648. Xline mode macro, you must leave the \*Q\\n\*U out of the expansion.
  649. XWithout the newline, the macro will not be executed immediately, so
  650. Xyou have a chance erase the line (or part of it) and type
  651. Xsomething different.
  652. XRemember that the
  653. X.B getline
  654. Xfunction keeps the newline in the string it gets, so if you don't
  655. Xwant a newline to appear, you must use
  656. X.BR getstr .
  657. XWhen using the
  658. X.I get
  659. Xfunctions, you should also remember that you can
  660. X.I never
  661. Xbackspace past the \*Qbeginning\*U of a
  662. X.BR getline ,
  663. Xand you can backspace past the beginning of a
  664. X.B getstr
  665. Xonly after the get has been completed.
  666. X.PP
  667. XWhen the
  668. X.B getstr
  669. Xfunction is used in line mode macros,
  670. X.I Mush
  671. Xwill reprint the current input line so you can see what the whole
  672. Xthing looks like, but will not redisplay the line mode prompt
  673. X(see the entry for
  674. X.B prompt
  675. Xin the VARIABLES section for information on what the
  676. Xprompt looks like).
  677. XDon't let this worry you.
  678. XThe input line is also reprinted when
  679. X.B getline
  680. Xis used, but the newline in the input string usually results in a
  681. Xnew prompt being displayed.
  682. X.PP
  683. X.IR NOTE :
  684. XLine mode macros are not available when using the line-mode escape
  685. Xfunction in curses mode.
  686. XIt is necessary to escape all the way to line mode (that is, leave
  687. Xcurses mode by typing carriage-return at the `:' prompt) in order
  688. Xto access line mode macros.
  689. XThis is to prevent possible confusion when similar macros exist
  690. Xin both line and curses modes.
  691. X.PP
  692. X.BR "Composition mode macros" .
  693. X.PP
  694. XComposition mode macros are very similar to line mode macros, and
  695. Xprovide a \*Qpower typing\*U function when composing messages.
  696. XFor example, you might want to have the word \*Qpercent\*U inserted
  697. Xinto your message whenever you hit the `%' key:
  698. X.sp
  699. X.ti +4
  700. Xmap! % percent
  701. X.sp
  702. XAnother use is to simulate the indentation features of editors.
  703. XFor example, you might
  704. X.sp
  705. X.ti +4
  706. Xmap! '\\CT' '\ \ \ \ '
  707. X.sp
  708. X(where the expansion is four spaces, enclosed in single quotes).
  709. XThis macro causes four spaces to be inserted into the message whenever
  710. Xcontrol-T is typed.
  711. X.PP
  712. XComposition mode macros can also be used to execute
  713. X.I tilde-escapes
  714. X(see the GENERAL USAGE section for a list of these).
  715. XFor example, you could create a macro to invoke the editor:
  716. X.sp
  717. X.ti +4
  718. Xmap! '\\CE' '\\n~v\\n'
  719. X.sp
  720. XWhen control-E is typed, this macro prints a newline (to be sure that
  721. Xthe tilde-escape is the first thing on a line), then types \*Q~v\*U
  722. Xfollowed by another newline, to start the editor.
  723. XSimilar macros can be created for other tilde-escapes.
  724. X.PP
  725. X.BR "Mixed mode macros" .
  726. X.PP
  727. XIt is not normally possible to mix macros among the different modes.
  728. XHowever, once expansion has begun, it is interrupted only by an error
  729. Xor by the appearance of one of the special
  730. X.I get
  731. Xfunctions.
  732. XIt is therefore possible to have a macro expansion which causes
  733. Xthe mode to change before the expansion has completed.
  734. XIn this case, recursive expansions will apply to the new mode.
  735. XSuppose we are using a variation of the editor-starting macro shown
  736. Xabove for composition mode:
  737. X.sp
  738. X.ti +4
  739. Xmap! '\\CE' '\\n~v emacs\\n'
  740. X.sp
  741. XThis macro causes the \*Qemacs\*U editor to be started when control-E
  742. Xis typed in composition mode.
  743. XWe can now create a line mode macro that makes use of this
  744. Xcomposition mode macro:
  745. X.sp
  746. X.ti +4
  747. Xmap '#' 'reply \-i [getline]~t[getline]\\CE'
  748. X.sp
  749. XWhen the `#' key is pressed in line mode, this macro will
  750. Xprint \*Qreply \-i\*U and wait for a message list, then enter
  751. Xcomposition mode (by executing the
  752. X.B reply
  753. Xcommand).
  754. XIn composition mode, it will display the To: line
  755. X(the \*Q~t\*U escape) and wait for other addresses to be added.
  756. XFinally, it will recursively expand the control-E macro, to
  757. Xstart editing the message with emacs.
  758. X.PP
  759. XAs can be seen from this example, the
  760. X.I Mush
  761. Xmacro facility is very powerful.
  762. XBe very careful not to accidentally expand recursive macros,
  763. Xespecially when using macros that change modes.
  764. XWhen testing new macros, it is a good idea to start
  765. X.I Mush
  766. Xin
  767. X.I read-only
  768. Xmode (the \-r command line flag) to be sure that messages are
  769. Xnot lost or altered.
  770. X.PP
  771. X.BR "Getting rid of macros" .
  772. X.PP
  773. XIt is not necessary to delete a macro in order to redefine it.
  774. XNew expansions for existing key sequences will automatically replace
  775. Xthe old expansions.
  776. XIf it is necessary to remove a macro completely, the commands
  777. X.BR unbind ,
  778. X.B unmap
  779. Xand
  780. X.B unmap!
  781. Xcan be used to remove curses mode, line mode, and composition mode
  782. Xmacros, respectively.
  783. XRemember to use a backslash or other literal-next character to prevent
  784. Xthe expansion of line mode macros when using these commands, especially
  785. X.BR unmap .
  786. X.SH "MAIL ADDRESSES"
  787. XWhenever a command that requires a user address or set of addresses
  788. Xis specified
  789. X.RB ( mail ,
  790. X.BR reply ,
  791. X.BR alias ,
  792. X.BR etc )
  793. Xthe addresses given must be separated by commas.
  794. XMost casual users specify addresses that contain no comments or whitespace.
  795. XThe simplest addresses are just the login names of the users you wish to send
  796. Xyour message to:
  797. X.sp
  798. X.ti +2
  799. X\fBmail\fR fred barney wilma betty
  800. X.sp
  801. XIn these cases,
  802. X.I Mush
  803. Xcan figure out that they are separate addresses and
  804. Xinsert commas between addresses automatically.
  805. X.sp
  806. X.ti +2
  807. XTo: fred, barney, wilma, betty
  808. X.sp
  809. XAddresses may also contain `!', `@' and `%' characters which are used
  810. Xto separate hostnames and the final user name from each other.
  811. XThis is primarily used to mail to users on other machines.
  812. XUUCP addresses are specified as
  813. X.sp
  814. X.ti +2
  815. Xhost1!host2!user
  816. X.sp
  817. Xwhere there may be as many hosts as necessary to route the message
  818. Xto the recipient user.
  819. XHere, the user's account is on \*Qhost2\*U
  820. Xand that machine is connected to \*Qhost1\*U.
  821. X.I Domain
  822. Xaddresses (also called Arpanet, Internet, RFC822, and \*Qfully qualified\*U
  823. Xaddresses) are specified as
  824. X.sp
  825. X.ti +2
  826. Xuser@host.domain
  827. X.ti +2
  828. Xuser%host2.domain@host1
  829. X.sp
  830. Xwhere \*Qdomain\*U is a domain name such as \*Q.berkeley.edu\*U or \*Q.com\*U.
  831. XAs in the first example, the user is on \*Qhost2\*U, but that machine talks
  832. Xto \*Qhost1\*U.
  833. XIt is beyond the scope of this document to discuss in detail the ramifications
  834. Xof inter-network mailing.
  835. XMore information can be obtained through your system manager.
  836. X.PP
  837. X.I Mush
  838. Xunderstands addresses containing a comment field.
  839. XComment fields do not affect the destination address of mail being sent.
  840. XThese fields are purely for
  841. Xhuman legibility and may be specified according to the following constraints: 
  842. X.sp
  843. XAnything within angle brackets is an address; whatever is outside of the
  844. Xaddress is considered a comment:
  845. X.sp
  846. X.ti +2
  847. XDan Heller <zipcode!argv@cad.berkeley.edu>
  848. X.ti +2
  849. XDan Heller <argv@zipcode.com>
  850. X.sp
  851. XAnything that has parentheses is a comment; whatever is outside of the
  852. Xparentheses is considered the address:
  853. X.sp
  854. X.ti +2
  855. Xzipcode!argv (Dan Heller)
  856. X.ti +2
  857. Xargv@zipcode.com (Dan Heller)
  858. X.sp
  859. XDouble quotes (") are treated just like parentheses:
  860. X.sp
  861. X.ti +2
  862. X"Dan Heller" zipcode!argv
  863. X.ti +2
  864. X"Dan Heller" argv@zipcode.com
  865. X.sp
  866. XIf the comment is to contain a comma, the first case above may not be used;
  867. Xyou must use either the parenthesis or double-quote cases.
  868. X.sp
  869. X.ti +2
  870. Xfred@flintstone.bed.rock (Fred Flintstone, Cave Man)
  871. X.sp
  872. XIf the comment contains unbalanced quotes, unpredictable results may occur
  873. X.RI ( Mush
  874. Xwon't deliver the mail).
  875. X.sp
  876. XSince the angle brackets have the highest precedence, quotes or parentheses
  877. Xmay be used in conjunction with one another.
  878. X.sp
  879. X.ti +2
  880. XYabba Dabba Doo (Fred Flintstone) <fred>
  881. X.ti +2
  882. XScoobie "Doobie" Doo <scooby@shaggys.mystery.machine>
  883. X.PP
  884. XMultiple addresses may appear on a line:
  885. X.sp
  886. X.in +2
  887. Xargv@zipcode.com argv@garp.mit.edu dheller
  888. X.in -2
  889. X.sp
  890. XBecause there is no indication of comments (parenthesis, angle bracket,
  891. Xor quotes), it is assumed that these are separate addresses and
  892. X.I Mush
  893. Xwill insert commas between these addresses accordingly.
  894. XIt is for this reason that the user is encouraged to explicitly insert
  895. Xcommas between all mail addresses and not depend on the automation of comma
  896. Xinsertion to correctly separate addresses from one another.
  897. X.PP
  898. XMail aliases may contain addresses of the form described above.
  899. X.sp
  900. X.nf
  901. X.in +2
  902. X.ta 1.5i
  903. Xalias george    George Jetson <george@spacely.space.sprockets>
  904. Xalias jane    Jane Jetson <jane@sky-high.appts>
  905. Xalias group    george, jane
  906. X.in -2
  907. X.fi
  908. X.sp
  909. XYou can mail using the alias as an address and it will be expanded
  910. Xaccordingly.
  911. XYou cannot, however, reference an alias and specify a
  912. Xcomment or another address at the same time.
  913. X.sp
  914. X.ti +2
  915. XTo: The Jetsons <group>
  916. X.sp
  917. XThe alias \*Qgroup\*U will not be expanded because the angle brackets
  918. Xcauses it to be considered as another address entirely.
  919. X.SH FILES
  920. X.nf
  921. X.ta 2.0i
  922. X/usr/spool/mail/*    Directory for incoming mail
  923. X~/Mail    Default \fBfolder\fR directory
  924. X~/mbox    File where old mail is saved
  925. X~/.mushrc    File giving initial \fIMush\fR commands
  926. X~/.mailrc    Alternate initialization file
  927. X~/.edXXXXXXX    Temporary for file for outgoing messages
  928. X~/.mushXXXXXX    Temporary mail file (copy of current folder)
  929. X.fi
  930. X.PP
  931. XTemporary files that are created by the program are always
  932. Xcreated with read/write access to the owner only; group and other
  933. Xpermissions are never set.
  934. XThis is also true for the /usr/spool/mail/* files.
  935. XAll other files created by the user via commands internal or external
  936. Xto the program have permissions set by the user's default umask.
  937. XIf the umask is reset within the program, the mask remains
  938. Xintact even after exiting.
  939. XRemember to set the variable
  940. X.B unix
  941. Xbefore attempting to set the umask value.
  942. X.PP
  943. XIf your system is using Sun Microsystem's NFS, take special note to
  944. Xread the manual page for mount(1).
  945. XFilesystems mounted for read/write
  946. Xaccess should be mounted as \*Qhard\*U NFS mounts or you may lose
  947. Xmailboxes during a timeout during a write or update.
  948. X.PP
  949. XFilesystems that use RFS still have bugs to be ironed out in the way
  950. Xof owners and permissions concerning utime(2).
  951. X.SH "SEE ALSO"
  952. X.IR Mail (1),
  953. X.IR binmail (1),
  954. X.IR csh (1),
  955. X.IR aliases (5),
  956. X.IR mount (1),
  957. X.IR mailaddr (7),
  958. X.IR sendmail (8),
  959. X.IR printf (3),
  960. X.IR execl (3),
  961. X.IR umask (1),
  962. X.IR utime (2).
  963. X.SH AUTHOR
  964. XThe original
  965. X.I Mush
  966. Xwas written entirely by Dan Heller.
  967. XCode to support macros, line wrapping, and a whole lot of other miscellaneous
  968. Xdetails, was written by Bart Schaefer, who gets his name in print
  969. Xbecause he updated and proofread this manual.
  970. XNumerous others have supplied valuable suggestions
  971. Xand assorted bits and pieces.
  972. X.PP
  973. Xargv@sun.com       zipcode!argv
  974. X.SH DISCLAIMERS
  975. X.I Mush
  976. Xcontains no
  977. X.IR UNIX (TM)
  978. Xsources and never has.
  979. XIt is also not a modified version of any other mail user agent.
  980. XSimilarities
  981. Xwith any other mailer may have been designed for compatibility reasons.
  982. X.PP
  983. X.I UNIX
  984. Xis a trademark of AT&T.
  985. X.PP
  986. XThe Flintstones and The Jetsons are trademarks of Hannah-Barbara Inc.
  987. X.SH BUGS
  988. XThe curses interface uses the curses library.
  989. XThe routines from the library that are used are the most basic and simple
  990. Xso as to avoid possible bugginess that
  991. Xdifferent versions of UNIX might have.
  992. XHowever, one unavoidable problem is the reverse video mode.
  993. XDepending on your terminal,
  994. Xthe termcap entry for it, and the version of curses you are running,
  995. Xthe reverse video may make things worse than desired.
  996. XIn such situations, the user should set the variable
  997. X.B no_reverse
  998. Xto not get reverse video.
  999. X\&`^R' may still be entered at runtime in the curses
  1000. Xinterface to toggle reverse video.
  1001. X.PP
  1002. XToggling from the curses mode to the line mode to get the full
  1003. Xfunctionality of the shell/line mode is unfortunately necessary
  1004. Xin order to maintain the display in a sensible manner and to keep the
  1005. Xkeystroke-command interface simple and \*Quser friendly\*U.
  1006. XMostly, such escapes are only necessary
  1007. Xfor piping of commands and using the pick command.
  1008. XMacros are a big help with this.
  1009. X.PP
  1010. XIf the program is already running and the system [later] has to swap
  1011. Xand there is no swap space left, there may be problems.
  1012. XOne such problem is sending mail.
  1013. XIf this happens, then sending mail
  1014. Xwill fail and a segmentation fault from the spawned/forked child may occur
  1015. X(unless the -v flag was given to mail).
  1016. XThe unsent letter will not be removed from the editing file ($home/.edXXXXXX)
  1017. Xand may be recovered.
  1018. X.PP
  1019. XMany functions available to the line oriented mode (shell mode)
  1020. Xare not available to the tool mode.
  1021. XFor example,
  1022. X.B pick
  1023. Xmay not be directly accessed although experienced users may find that
  1024. Xtyping pick commands within single backquotes in the \*QRange:\*U panel item
  1025. Xabove the header window and then selecting a command that uses the the range
  1026. Xwill indeed pick messages.
  1027. XThis is mostly for selecting the \*Qdelete range\*U item
  1028. Xor the middle mouse button icon in the header panel.
  1029. X.PP
  1030. XVersion 6.5.6 was the last version designed to run under SunWindows, and is
  1031. Xtherefore the most recent version that will function under SunOS 2.x.
  1032. XThe current version, 7.0, has been ported to SunView, and may have
  1033. Xa completely new set of problems in addition to those described below.
  1034. XAlso, some of those described below may have been eliminated, and remain
  1035. Xin this discussion only for completeness.
  1036. X.PP
  1037. XShell escapes (of any kind) may be called only from the \*Qpipe\*U command
  1038. Xin the tool mode, should not be interactive, and should produce
  1039. Xoutput only to a file.
  1040. XThe reason for this is that there is no tty
  1041. X.I window
  1042. Xin which to do input/output.
  1043. XSince the interactive function-key binding interface has gone away, it is
  1044. Xunfortunately only possible to execute commands that have been pre-defined
  1045. Xin the initialization file.
  1046. XFuture revisions may correct these deficiencies.
  1047. X.PP
  1048. XThe function keys and their ability to
  1049. X.I work
  1050. Xhas been variable depending on the version of SunWindows/SunView
  1051. Xyour Sun Workstation has.  From time to time, it works, but when it
  1052. Xdoesn't, it seems to be related to other user or system definable
  1053. Xdot-files or whatever.
  1054. XThis of course means that the function keys are relatively untested
  1055. Xin conjunction with SunView (SunOS later than 3.3).
  1056. XThe default function key bindings have been eliminated
  1057. Xto avoid collisions with SunView window system functions.
  1058. X.PP
  1059. XChanging the value of the
  1060. X.BR screen_win ,
  1061. X.BR crt_win ,
  1062. Xor
  1063. X.B msg_win
  1064. Xvariables after the tool is running simply has no effect.
  1065. X.PP
  1066. XWhen using
  1067. X.B vi
  1068. Xin the tool mode, the window is periodically one
  1069. Xline \*Qshort.\*U
  1070. XThat is, scrolling is off by one line and you have
  1071. Xto redraw the window (using \*Qz.\*U in vi) to get it in sync again.
  1072. XThis problem remains in most SunView implementations, but does not
  1073. Xseem to appear with the current default composition window size.
  1074. X.PP
  1075. XWhen running on full filesystems,
  1076. X.I Mush
  1077. Xmay complain or not even run since it needs temporary space with which
  1078. Xto work.
  1079. XInstead of finding new filesystems on its own,
  1080. X.I Mush
  1081. Xleaves this task up to the user.
  1082. XThe workaround is to set the variable
  1083. X.B tmpdir
  1084. Xin the initialization file to be a writable place in a filesystem that
  1085. Xhas enough disk space.
  1086. X.PP
  1087. XMost of the other known and documented bugs
  1088. Xare in the supplied README files accompanying the source.
  1089. XThe source is also an excellent place to look as many known bugs are
  1090. Xdocumented in comments.
  1091. XA good way to track suspicious bugs is to use the
  1092. X.B debug
  1093. Xcommand, but note that
  1094. Xthis command is very difficult to use in curses mode.
  1095. END_OF_FILE
  1096. if test 33714 -ne `wc -c <'mush/mush.1.d'`; then
  1097.     echo shar: \"'mush/mush.1.d'\" unpacked with wrong size!
  1098. fi
  1099. # end of 'mush/mush.1.d'
  1100. fi
  1101. if test -f 'mush/tool_help' -a "${1}" != "-c" ; then 
  1102.   echo shar: Will not clobber existing file \"'mush/tool_help'\"
  1103. else
  1104. echo shar: Extracting \"'mush/tool_help'\" \(17313 characters\)
  1105. sed "s/^X//" >'mush/tool_help' <<'END_OF_FILE'
  1106. X@(#)tool_help    (c) copyright 10/18/86 (Dan Heller)
  1107. X
  1108. X%general%
  1109. X
  1110. X      IF ALL ELSE FAILS, READ THE DIRECTIONS!
  1111. X
  1112. XThis famous  quote applies here more  than ever. If
  1113. Xyou are unfamiliar with Mushview, you should get
  1114. Xyourself acquainted with it by choosing HELP options
  1115. Xin menu items. If you get frustrated or confused
  1116. Xabout how to use or run a command, or if you want to
  1117. Xknow how something works or get to know quick shortcuts
  1118. Xin achieving tasks, it is advisable to look at the
  1119. XHelp option available with some items.
  1120. X%%
  1121. X
  1122. X%help%
  1123. XHelp was designed for users to get help from all commands
  1124. Xand options.  The last item in many menus is a "help"
  1125. Xchoice.  You will get an appropriate help message describing
  1126. Xwhat you can do at the position you are in on the Mushview
  1127. Xwindow.
  1128. X
  1129. XIf a help message isn't much help, it may be more helpful to
  1130. Xreference a different help item which describes in more detail
  1131. Xwhat you want to know.  For example, reading the help for
  1132. X"folder" will help you better understand the method in which
  1133. Xmail messages are stored than it would if you had read the help
  1134. Xmessage for "save" first.
  1135. X%%
  1136. X
  1137. X%mouse%
  1138. XThe mouse is an image (cursor) which moves across the screen. Its
  1139. Xposition indicates which window is to receive input when you type
  1140. Xor click a mouse button.
  1141. X
  1142. XThe mouse may take upon different images which indicate various
  1143. Xthings. When the image looks like a "coffee cup", Mushview is in
  1144. Xthe process of doing something, like sending mail, or reading in
  1145. Xnew mail.  In this event, you should wait till the cursor returns
  1146. Xto its normal state before attempting to do anything else. Go get
  1147. Xsome coffee.
  1148. X
  1149. XWhen in the Header Window, the cursor will look like the mouse
  1150. Xdevice that you hold with the buttons flashing on and off.  This
  1151. Xis to remind you that you can use each button to do different tasks.
  1152. XUsing the RIGHT mouse button gives you a menu of options to do for
  1153. Xthe message under the mouse.
  1154. X%%
  1155. X
  1156. X%respond%
  1157. XThis item responds to mail in 4 ways.
  1158. XIn all cases, at least one recipient of your message will be the
  1159. Xsender of the message you are responding to. If a subject was in
  1160. Xthe author's letter, then it will be used as your subject.
  1161. X
  1162. XThe first and most used method of response is to the author of the
  1163. Xmessage only.  Selecting this item with the LEFT mouse button will
  1164. Xuse this method for responding to mail.
  1165. X
  1166. XIf you want to include a copy of the author's message, then choose
  1167. Xthe menu item which  says to include the message.  If you wish for
  1168. Xall the recipients of the message to receive a copy of your reply,
  1169. Xthen choosing the third item will include them.
  1170. X
  1171. XThe fourth menu item will mail to the author and everyone listed on
  1172. Xthe To and Cc lines of the message, and include the message you are
  1173. Xresponding to in your text.
  1174. X
  1175. XIn such cases where you include the message you are responding to,
  1176. Xthe included message will be indented by "> " to identify it from
  1177. Xyour message. If you would like to have a string other than the
  1178. Xdefault used, then set the appropriate option to whatever you would
  1179. Xprefer by selecting the "Opts" item, moving the mouse on top of the
  1180. Xstring, "indent-str", selecting the LEFT mouse button and typing the
  1181. Xdesired string.
  1182. X%%
  1183. X
  1184. X%delete%
  1185. XYou may  delete or undelete  messages with this item.
  1186. XWhen using the LEFT mouse button, you will delete the
  1187. Xcurrent message (HIGHLIGHTED in the headers' window).
  1188. XOtherwise, you may select the menu item for undelete.
  1189. X
  1190. XYou may  delete or undelete a  "range" of messages by
  1191. Xtyping the range in the Header Window.
  1192. X
  1193. XFor help on valid  message ranges, select the menu in
  1194. Xthe area  marked "range" in the  Header Panel Window.
  1195. X%%
  1196. X
  1197. X%folder%
  1198. XYour "folder" is a place to keep all your individual messages. Usually,
  1199. Xif you are a heavy mail user, you would organize your mail in such a
  1200. Xway in which related mail would be saved together in one folder.   You
  1201. Xcreate folders simply by saving mail to a filename.  Additional mail
  1202. Xcan  be saved to those files in the same way.  To manipulate messages
  1203. Xin folders,  you "change folders" to the folder you wish to access
  1204. Xusing the folder item.   Since it may occur that you switch  back and
  1205. Xforth  between two folders, you may use the previous  folder menu item
  1206. Xwhich updates changes  made to the current folder and  changes your
  1207. Xfolder to the one previous to  the current.
  1208. X
  1209. XYou may also select  the exact name of the  folder you wish to access
  1210. Xby selecting  the left  mouse button on the "folder"  item and TYPING
  1211. Xthe exact  name of the folder  you wish to access.  The "pathname" to
  1212. Xthe folder may start with a tilde (~) indicating your home directory.
  1213. XOr, it may  contain a plus sign before the  name indicating your Mail
  1214. Xdirectory (+reports, for example).  Alternatively, you  can type  '%'
  1215. Xto access your system Mailbox, the place where all your mail is first
  1216. Xdelivered.  And finally, you can type '#' to indicate  the previously
  1217. Xaccessed folder.
  1218. X%%
  1219. X
  1220. X%save%
  1221. XYou may save messages in  two ways. The most commonly used method is to
  1222. Xsave messages to  your mailbox folder  ("mbox") in your home directory.
  1223. XIf you use mail very frequently and save large amounts of mail, you can
  1224. Xsave messages to other folders for better organization.
  1225. X
  1226. XUsually, when messages are saved, mushtool  marks them for deletion for
  1227. Xthe next update.  If you don't want to have saved messages deleted, you
  1228. Xmust undelete them or set the variable "keepsave" in the options screen.
  1229. X
  1230. XThere is a text item  in the Main Panel Window which allows you to type
  1231. Xthe  name of the file to save a message.  Type the filename and then
  1232. Xselect the LEFT mouse button over the "Save" item.  If there is no
  1233. Xfilename specified, then messages are saved to your mbox file.
  1234. X
  1235. XYou may also choose a folder name by selecting the RIGHT mouse button
  1236. Xover the "Save" item and choosing from the menu of files displayed.
  1237. X
  1238. XYou can specify a range, or group of messages to save by typing a range
  1239. Xin the  Header Panel Window.  If there is a  message list in that panel
  1240. Xitem, then the range of messages specified there will be saved. If not,
  1241. Xthe current message will be saved.
  1242. X
  1243. XFor additional information, see the help option for Folders.
  1244. X%%
  1245. X
  1246. X%quit%
  1247. XThere are various ways in which you may be finished with Mushview.
  1248. XThe most commonly used method  is to simply "close" the tool to an
  1249. Xiconic form. This means that you haven't really quit, but you have
  1250. Xmerely put it on "hold" till later.  It will become an icon on the
  1251. Xside or corner of the screen and appear to sit and do nothing.  To
  1252. Xclose the tool to icon form, there are two methods which have will
  1253. Xhave two different effects.
  1254. X
  1255. XThe first method is to select  this panel item with the left mouse
  1256. Xbutton.  This  will update your current  folder (deleting messages
  1257. Xmarked for deletion) and close the tool.  The second method  is to
  1258. Xuse the tool manager around the perimeter of the window and select
  1259. X"close".  This will close the tool without updating your mailfile.
  1260. X
  1261. XWhenever Mushview is  in the "closed"  state, it  periodically
  1262. Xchecks your mail and updates your folder with the  new mail. While
  1263. XMushview is in iconic form, it will display the number of messages
  1264. Xyou have in the current folder.
  1265. X
  1266. XThere are two equally similar methods of exiting  Mushview, rather
  1267. Xthan just closing to an icon:  you may select the second menu item
  1268. Xin the menu given by this panel item or you may use the tool mana-
  1269. X "quit" item.
  1270. X
  1271. XUsing the tool manager's quit will exit the tool without updating
  1272. Xyour folder whereas the panel item's menu selection will have the
  1273. XMushview prompt you whether to update the current folder or not.
  1274. X%%
  1275. X
  1276. X%update%
  1277. XThis item will update the current folder you are using.  Changes are
  1278. Xupdated to the folder; that is, deleted mail is removed and all other
  1279. Xmail is copied back to the folder unless otherwise specified. See the
  1280. Xhelp in "folder" for more information on folders.
  1281. X
  1282. XIf new mail has arrived, it will incorporate it. Otherwise, new mail
  1283. Xis incorporated every two minutes or so, if some comes in.
  1284. X%%
  1285. X
  1286. X%headers%
  1287. XThe message headers are displayed in their own separate window.
  1288. XThe "current" message is usually displayed in either BOLD or
  1289. XREVERSE text. This "highlighted" message is the one which is
  1290. Xdisplayed at the bottom, larger window. In the message window,
  1291. Xeach message is displayed in the following format:
  1292. Xthe message number is displayed first; if it is the "current"
  1293. Xmessage, then there is a '>' sign.
  1294. XThe next character is the 'status' character:
  1295. X    'N' -- New (and unread)
  1296. X    'U' -- not new, but still Unread
  1297. X    '*' -- delete messages (set show_deleted)
  1298. X    'P' -- preserve in spoolfile.
  1299. X    'O' -- Old message which has also been Read.
  1300. XIf there is just a space (no character), the message is new, but
  1301. Xyou've already read it. You should explicitly save or delete these.
  1302. X
  1303. XFollowing that is the Author of the message and/or all or part of
  1304. Xhis network address and login name.  Following that is the number
  1305. Xof lines the message is. In quotes is all or part of the "Subject"
  1306. X(if one was specified).
  1307. X
  1308. XTo read a message, select either the READ item in the main panel
  1309. Xsubwindow or move the mouse over the message header you want to read
  1310. Xand press the LEFT mouse button. Or, the MIDDLE mouse button will
  1311. Xdelete that message. Choosing the RIGHT mouse button will give you
  1312. Xa menu of things to do then. Included in the menu, is a help item
  1313. Xwhich describes the selections in the menu.
  1314. X%%
  1315. X
  1316. X%Menu Read%
  1317. XWhen pointing at a message header in the header subwindow, hold down
  1318. Xthe RIGHT mouse button and select "Read" from the menu.  A new window
  1319. Xwill open containing the text of the message.  In this way, you can
  1320. Xdisplay more than one message at a time.
  1321. X
  1322. XThis operation sometimes fails on SunOS 3.5 systems due to limitations
  1323. Xon the number of windows Mush can open at once.  When all the available
  1324. Xwindows are in use, the selected message is displayed in the message
  1325. Xsubwindow at the bottom of the main window.
  1326. X%%
  1327. X
  1328. X%preserve%
  1329. XUsually, after you read mail and you "update" or quit  Mushview, unread
  1330. Xmessages are copied back into your system mailbox, deleted messages are
  1331. Xremoved, and messages which have been read but not deleted are saved in
  1332. Xyour "mbox" file.  Specifying "hold" prevents this from ever happening,
  1333. Xbut you can mark specific messages to be held in your system mailbox by
  1334. Xpreserving them.
  1335. X%%
  1336. X
  1337. X%compose%
  1338. XWhen you start to compose a letter for mailing, you will be prompted
  1339. Xfor a recipient (To:) and other optional mail headers.  The cursor for
  1340. Xthe text subwindow will look like a bent arrow to indicate that when
  1341. Xyou hit RETURN, the cursor will automatically forward to the next
  1342. Xheader (the Subject: line, for example).
  1343. X
  1344. XWhen the cursor resumes its original shape, the RETURN key enters new
  1345. Xlines as normal.
  1346. X
  1347. XThere must be a recipient specified in order to send a message.  The
  1348. Xrecipient may be a user or a file or program name.
  1349. X%%
  1350. X
  1351. X%next%
  1352. XYou can page through all your messages by selecting  "Next" after reading
  1353. Xeach message. The same effect is gotten when you select the "Delete" item
  1354. Xwhen the option,  "autoprint" is set to be true  (see "opts") except that
  1355. Xthe current message is deleted before the next one is displayed. Deleting
  1356. Xmail which is  not important  helps the  efficiency of Mushview and reduces
  1357. Xunnecessary use of system resources.
  1358. X
  1359. XIn the Header Window, you will notice the cursor looks like the mouse you
  1360. Xuse.  The blinking buttons on the mouse image remind you that you can use
  1361. Xany of the  three buttons  at any  time.  When you  move the mouse over a
  1362. Xmessage and choose a button, the message under the  mouse is going to be
  1363. Xthe one affected.  Choosing left button will read the message, the middle
  1364. Xbutton will delete it, and the right button will give you a menu.
  1365. X%%
  1366. X
  1367. X%aliases%
  1368. XAliases are used as a method of mailing to users with long addresses using
  1369. Xshort names. For example, if you wanted to mail to
  1370. X    argv@sun.com
  1371. Xbut didn't want to type that all the time, then you could make an alias by
  1372. Xselecting the alias menu item that specifies "adding alias" and then TYPE:
  1373. X    Dan argv@sun.com
  1374. XIf you want to mail to a list of people and do so frequently enough to want
  1375. Xan alias name for the whole list, then  you would type something like this:
  1376. X    project-group fred mary bob@foo-bar herb sly@baz.bitnet
  1377. X
  1378. XTo mail to an "alias" you would compose a letter and address the letter:
  1379. X
  1380. XTo: Dan
  1381. XSubject: Alias example
  1382. XCc: project-group
  1383. X(rest of letter)
  1384. X%%
  1385. X
  1386. X%alts%
  1387. X"Alternates" are alternate names for YOU.  In messages you receive,
  1388. Xyour account will appear on the "To" or "Cc" list.  When you REPLY to
  1389. Xthose messages, Mushview will construct a message header for your
  1390. Xletter which will contain the To and Cc lists of recipients from the
  1391. Xoriginal message. You would probably want your name taken off the list
  1392. Xso you do not mail yourself a copy of your own message. If you have
  1393. Xother account names or accounts on other machines, you can let Mushview
  1394. Xknow what those mail addresses are so they can be removed from the
  1395. Xlists as well.
  1396. X
  1397. XNote, that if YOU add your name MANUALLY (type it yourself) to either
  1398. Xof the lists, it will not be removed.
  1399. X
  1400. XYou can set such a list in your .mailrc file in your home directory by
  1401. Xadding the line:
  1402. X
  1403. Xalts hostname1 hostname2 ...
  1404. X
  1405. XIf you prefer to not have your name removed from lists when responding
  1406. Xto mail, set the option "metoo"; this prevents the need for alternates
  1407. Xand your name will never be removed.
  1408. X%%
  1409. X
  1410. X%options%
  1411. XTo set or unset options and their values, move the mouse over the
  1412. Xoption of your choice and select the LEFT button to toggle true/false
  1413. Xvalues. If an option requires a string value, you must type the value,
  1414. Xso select the LEFT button to reference the option, and then type away.
  1415. X
  1416. XNOTE: You must use a Carriage Return to enter the final value for the
  1417. Xoption or the value will not change.
  1418. X%%
  1419. X
  1420. X%ignore%
  1421. XWhen reading mail, the message "headers" may clutter up the
  1422. Xwindow with information you are not interested in.  For
  1423. Xexample, you may not be interested in the "Received" or
  1424. X"Message-Id" field of the mail message. You would find that
  1425. Xin time, it will become annoying to see these uninteresting
  1426. Xmessage headers.
  1427. X
  1428. XYou can specify which message headers should not be shown,
  1429. Xthus shortening the appearance of the length of the message.
  1430. X
  1431. XTypical settings:
  1432. X    Received
  1433. X    Message-Id
  1434. X    Status
  1435. X%%
  1436. X
  1437. X%printer%
  1438. XThis item will send the current message, or the message specified on
  1439. Xthe range item, to the printer.  The printer used is given by the
  1440. Xvariable $printer.  To specify a different printer, change the printer
  1441. Xoption by selecting the item "Options" in the Main Panel Window, moving
  1442. Xthe mouse over the "printer" option, selecting the LEFT mouse button
  1443. Xand typing the name of the printer which you'd like to use.
  1444. X
  1445. XBe sure to set this option before printing because the DEFAULT option
  1446. Xmay not be what you want.
  1447. X
  1448. XYou can print messages that are NOT the current message by moving the
  1449. Xmouse into the Header Window and selecting the RIGHT mouse button on
  1450. Xtop of the message you want to print and selecting the PRINT menu
  1451. Xoption.
  1452. X%%
  1453. X
  1454. X%windows%
  1455. X"Windows" are the boxes which contain items, text, or graphic
  1456. Ximages.  There are two "panel" windows. A panel window is one
  1457. Xwhich contains items,  which are the little boxes  with words
  1458. Xthat you can place the mouse over and click the left or mouse
  1459. Xbutton.
  1460. X
  1461. XEach  window has a separate  function for different purposes.
  1462. XStarting at the top of the main "tool" (contains all windows)
  1463. Xwe have the "header panel." Everything in this panel pertains
  1464. Xto the message headers, only.  The panel in the middle of the
  1465. Xtool is the "mail panel" which is more general and applies to
  1466. Xjust about everything. For a description of each of the items
  1467. Xwithin any panel, select the  "Help"  option  from  the  menu
  1468. Xyou get by selecting the RIGHT mouse button.
  1469. X%%
  1470. X
  1471. X%message range%
  1472. XYou can specify a large group of messages using a combination of special
  1473. Xsymbols in addition to numbers.  For example, if you wish to save all of
  1474. Xthe messages, then you can use `*' to represent them all. If you were to
  1475. Xtype the  "star" and select the Save  menu option for "save range", then
  1476. Xyou would save ALL the messages you have (including deleted ones).
  1477. X
  1478. XIf you would like to save messages 4 through 9, then you would specify:
  1479. X      4-9
  1480. XIf you want to specify the messages between 2 and 32 except for messages
  1481. X6, 8 and message 12-14, you would type:
  1482. X      2-32 {6,8,12-14}
  1483. XCommas or spaces can be used to separate numbers.
  1484. X
  1485. XNote that you cannot specify negated messages without first specifying
  1486. Xnormal messages; e.g. {2-5} 1-11   doesn't make sense.
  1487. X%%
  1488. X
  1489. X%sort%
  1490. XSorting messages can   be accomplished by  selecting one  of the
  1491. Xmenu items in this panel item.  By default (using the LEFT mouse
  1492. Xbutton),  sorting is  done by  message status.  New messages are
  1493. Xfirst, followed  by unread messages,  old/read messages, replied
  1494. Xto  messages,  and  finally deleted messages.  You may also sort
  1495. Xmessages by author, date, or subject by selecting the menu item.
  1496. X%%
  1497. X
  1498. X%include%
  1499. XTo include a message in your letter, first enter the number of the
  1500. Xmessage you wish to include in the  Range:  item of the main  mush
  1501. Xframe.  Then select  Include  from the composition window panel by
  1502. Xpressing the LEFT mouse button.    If you do not specify a message
  1503. Xin the  Range:  item, the current message will be included.
  1504. X
  1505. XTo forward a message, choose the message to be forwarded as above,
  1506. Xuse the RIGHT mouse button on the  Include item and select Forward
  1507. XMessage from the menu.
  1508. X%%
  1509. END_OF_FILE
  1510. if test 17313 -ne `wc -c <'mush/tool_help'`; then
  1511.     echo shar: \"'mush/tool_help'\" unpacked with wrong size!
  1512. fi
  1513. # end of 'mush/tool_help'
  1514. fi
  1515. echo shar: End of archive 8 \(of 19\).
  1516. cp /dev/null ark8isdone
  1517. MISSING=""
  1518. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
  1519.     if test ! -f ark${I}isdone ; then
  1520.     MISSING="${MISSING} ${I}"
  1521.     fi
  1522. done
  1523. if test "${MISSING}" = "" ; then
  1524.     echo You have unpacked all 19 archives.
  1525.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1526. else
  1527.     echo You still need to unpack the following archives:
  1528.     echo "        " ${MISSING}
  1529. fi
  1530. ##  End of shell archive.
  1531. exit 0
  1532.  
  1533.  
  1534.