home *** CD-ROM | disk | FTP | other *** search
/ ftp.freefriends.org / ftp.freefriends.org.tar / ftp.freefriends.org / arnold / Source / mush.rstevens.tar.gz / mush.tar / Mushrc < prev    next >
Text File  |  1990-10-21  |  6KB  |  137 lines

  1. # Mushrc -- suggested /usr/lib/Mushrc init file for Mush
  2. # Copyright (c) 1989 by Bart Schaefer and Dan Heller
  3. #
  4. # Set these variables as they are set in config.h
  5. # (assumes that this file is DEFAULT_RC from config.h)
  6. set \
  7.     MAILRC =    ".mushrc" \
  8.     ALTERNATE_RC =    ".mailrc" \
  9.     ALT_DEF_RC =    "/usr/lib/Mail.rc"
  10.  
  11. # Set up the display early to allow quick exit in headers-only mode.
  12. # The hdrs_only flag is true if the command line was: "mush -H".
  13. # The variable hdr_format is set to change the format of the header
  14. # summaries that are displayed.
  15. if hdrs_only
  16.     set hdr_format='%22a %M %-2N %5T  %.33s'
  17.     exit    # Quits reading this file
  18. else
  19.     set hdr_format='%22a %M %-2N %5T (%3.5l li) %.25s'
  20. endif
  21.  
  22. # Set the prompt to show current time, name of the current folder,
  23. # current message number, and count of total messages.
  24. set prompt="(%T) %f: #%m of %t> "
  25.  
  26. # Hitting <CR> should do nothing (helps make mush more shell-like).  If
  27. # newline is not set, hitting <CR> prints the next message (like Mail).
  28. # This variable could be set to any mush command.
  29. set newline
  30.  
  31. # When reading messages, don't bother looking at lengthy, boring headers.
  32. ignore message-id received via status priority
  33.  
  34. # Since mush has csh-like history, you might find it annoying to type
  35. # things like "mail host\!host1\!host2\!user" from within the mush shell.
  36. # Setting nonobang will prevent the "unknown event" and allow the !'s to
  37. # be typed without having to be preceded by backslashes.
  38. set nonobang
  39.  
  40. # By default, mush's history is set to the last command only.  Set it to
  41. # remember the last 100 commands.
  42. set history = 100
  43.  
  44. # If the variable "unix" is set, then any command that isn't a mush command
  45. # will execute the command as if you typed it from the shell.  Note, such
  46. # commands will not go through another shell -- this is it.  This may be
  47. # considered confusing for new users, so it is commented out by default.
  48. # set unix
  49.  
  50. # When you use the -i option to reply, or use the ~i tilde escape in a letter
  51. # when in compose mode, the current message will be included in your text.
  52. # Put a nice wrapper around those included messages.  Here, show the author's
  53. # name and the subject of his letter, label the end, and add a trailing blank
  54. # to separate each inclusion and make finding the end easier.
  55. set pre_indent_str='On %M %N, %T, %.50n wrote:\n} Subject: %.65s'
  56. set indent_str='} '    # actual message text is preceded by a "}"
  57. set post_indent_str='}-- End of excerpt from %.50n\n'
  58.  
  59. # Label replies with a header showing the who, what, and when of the
  60. # message being replied-to.
  61. set in_reply_to='%f\n\t"%s" (%d)'
  62.  
  63. # Mail routing and address-fixing conveniences.  If auto_route is set, then
  64. # replies to messages take a closer look at the addresses of the recipients.
  65. # If any redundant paths are present, they are pruned.  Also, the path that
  66. # precedes any hosts listed in the "known_hosts" list is truncated.  This is
  67. # useful for uucp sites only, and is therefore commented out by default.
  68. # set auto_route known_hosts="sun ucbcad well unicom"
  69.  
  70. # The curses mode allows the screen to be set up like a full screen editor.
  71. # There are basic "curses commands" which are bound to keyboard key-sequences
  72. # (usually one character).  The user can rebind these keys to suit his tastes.
  73. # Note that the binding for R below removes the binding of reply-all.
  74. #
  75. set curses_help        # Unset this to remove help message in curses.
  76. bind \n display        # Hit return to display the next message.
  77. bind e macro "[line-mode]edit\n"    # Quick edit from curses.
  78. bind P macro "[line-mode]Print\n"    # Show me all the headers.
  79.  
  80. # "cmd" is used to set command line aliases similar to the way "csh"
  81. # does it.  The only difference is that "alias" is a reserved word in
  82. # Mush and Mail, so cmd is used.
  83. #
  84. cmd dq 'd \!*; q'        # Delete a message list, then quit.
  85. cmd unread 'flags \!* U O'    # Mark messages unread.
  86. cmd : curses            # Colon now "toggles" curses mode.
  87.  
  88. # Read the alternate system init file in addition to this file
  89. source $ALT_DEF_RC
  90. unset ALT_DEF_RC
  91.  
  92. # Mush tries to read ~/.mushrc first, then it tries ~/.mailrc.  If .mushrc
  93. # is found, .mailrc is normally not read.  Source the contents of .mailrc
  94. # as well in case there are Mail aliases that are set there.
  95. if -e $HOME/$MAILRC
  96.     if -e $HOME/$ALTERNATE_RC
  97.     source $HOME/$ALTERNATE_RC
  98.     endif
  99. endif
  100. unset ALTERNATE_RC
  101.  
  102. # The rest of this file demonstrates how sysadmins with novice users
  103. # might want to set things up.
  104.  
  105. if -e $HOME/.mushexpert
  106.     set quiet
  107.     exit
  108. endif
  109. if ! -e $HOME/.mushuser
  110.     echo "I see you've never used the Mush program before."
  111.     echo "I'll set some special flags to help you out."
  112.     echo "After you've used Mush a few times, you can type the command:"
  113.     echo ""
  114.     echo "    expert"
  115.     echo ""
  116.     echo "and the flags will no longer be set unless you put them"
  117.     echo "in your $HOME/$MAILRC file."
  118.     echo ""
  119.     sh touch $HOME/.mushuser    # Use sh in case $unix is not set.
  120.     if $?quiet
  121.     unset quiet        # Show the help message on startup.
  122.     endif
  123. endif
  124. # At this point some helpful variables should be set.  See the list above,
  125. # marked as "helpful for new users", for suggestions.
  126. #
  127. # Create the "expert" command mentioned in the message above.
  128. cmd expert 'sh touch $HOME/.mushexpert'
  129.  
  130. # These variables are helpful for new users:
  131. #    ask        -- always prompt for Subject: of mail
  132. #    ignoreeof    -- ignore end-of-file from keyboard
  133. #    verify        -- query that all is well before sending mail
  134. #    warning        -- report miscellaneous possible problems
  135. set ask verify warning
  136. set ignoreeof="echo 'Use "'"'quit'"'" to quit.'"
  137.