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

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