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
/
sample.mushrc
< prev
next >
Wrap
Text File
|
1990-10-21
|
7KB
|
148 lines
# sample.mushrc
# By Bart Schaefer and Dan Heller
#
# Change mush's temp file directory, to avoid quota collisions.
# /usr/tmp so tmpfiles won't be rm'd before they can be recovered.
set tmpdir=/usr/tmp
# Set the folder and mbox locations; the + expands to value of "folder".
set folder=$HOME/Mail mbox=+mbox
# Set up the display early to allow quick exit in headers-only mode.
# The hdrs_only flag is true if the command line was: "mush -H".
# The variable hdr_format is set to change the format of the header
# summaries that are displayed.
if hdrs_only
set hdr_format='%28a %M %-2N %.33s'
exit # Quits reading this file
else
set hdr_format='%28a %M %-2N (%3.5l li) %.25s'
endif
# Set the prompt to show current time, name of the current folder,
# current message number, and count of total messages.
set prompt="(%T) %f: #%m of %t> "
# Hitting <CR> should do nothing (helps make mush more shell-like). If
# newline is not set, hitting <CR> prints the next message (like Mail).
# This variable could be set to any mush command.
set newline
# These variables are helpful for new users:
# ask -- always prompt for Subject: of mail
# ignoreeof -- ignore end-of-file from keyboard
# verify -- query that all is well before sending mail
# warning -- report miscellaneous possible problems
set ask verify warning
set ignoreeof="echo 'Use "'"'quit'"'" to quit.'"
# When reading messages, don't bother looking at lengthy, boring headers.
ignore message-id received via status
# Since mush has csh-like history, you might find it annoying to type
# things like "mail host\!host1\!host2\!user" from within the mush shell.
# Setting nonobang will prevent the "unknown event" and allow the !'s to
# be typed without having to be preceded by backslashes.
set nonobang
# By default, mush's history is set to the last command only. Set it to
# remember the last 100 commands.
set history = 100
# If the variable "unix" is set, then any command that isn't a mush command
# will execute the command as if you typed it from the shell. Note, such
# commands will not go through another shell -- this is it.
set unix
# Mush tries to read ~/.mushrc first, then it tries ~/.mailrc. Assuming
# you use *this* file as your .mushrc, source the contents of .mailrc as
# well in case there are Mail aliases that are set there.
source $HOME/.mailrc
# Use a real pager.
set pager=less
# When typing in a letter, it is sometimes convenient to have lines wrap
# automatically similar to editors like vi and emacs. In this example, if
# the user types past column 74, a newline will automatically be inserted.
set wrapcolumn=74
# If "autosign" is set, then a file can be read in automatically whenever
# mail is sent. This file is normally your "signature," that is, your
# name and other information you want included in every message.
set autosign = ~/.signature
# When you use the -i option to reply, or use the ~i tilde escape in a letter
# when in compose mode, the current message will be included in your text.
# Put a nice wrapper around those included messages. Here, show the author's
# name and the subject of his letter, label the end, and add a trailing blank
# to separate each inclusion and make finding the end easier.
set pre_indent_str='On %M %N, %T, %.50n wrote:\n} Subject: %.65s'
set indent_str='} ' # actual message text is preceded by a "}"
set post_indent_str='}-- End of excerpt from %.50n\n'
# Label replies with a header showing the who, what, and when of the
# message being replied-to.
set in_reply_to='%f\n\t"%s" (%d)'
# Mail routing and address-fixing conveniences. If auto_route is set, then
# replies to messages take a closer look at the addresses of the recipients.
# If any redundant paths are present, they are pruned. Also, the path that
# precedes any hosts listed in the "known_hosts" list is truncated. This is
# useful for uucp sites only, and is therefore commented out in this sample.
# set auto_route known_hosts="sun ucbcad well unicom"
# The "alts" command specifies alternate addresses that I have. Here,
# "*" expands to any "path" whose recipient ends with the user's current
# login name. If another login name is desired, the login and/or path
# to that login must be preceded by a !. Otherwise, standard paths are used.
alts "*"
# The "map" command can rebind certain key sequences in tty-mode only.
# Here, if the user types two R's in a row at the prompt, then the string
# "reply -ei " will be echoed as if the user typed it.
map RR "reply -ei "
# "rr" will do a reply and do the newline for you so you don't have to.
map rr "reply\n"
# The "map!" command is similar to "map" in that you can do keyboard
# acceleration, but map! occurs during letter composition mode only.
map! '\CT' ' ' # ^T generates 4 spaces in composition mode.
# Here, hitting * twice will append a pre-signature.
map! ** "\n Later,\n"
# Be careful with map and map! -- you can cause an infinite loop.
# Your interrupt key (usually ^C) will stop such loops.
# The curses mode allows the screen to be set up like a full screen editor.
# There are basic "curses commands" which are bound to keyboard key-sequences
# (usually one character). The user can rebind these keys to suit his tastes.
# Note that the binding for R below removes the binding of reply-all.
#
set curses_help # Unset this to remove help message in curses.
bind \n display # Hit return to display the next message.
bind t top # Make it easier to see the top few lines.
bind e macro "[line-mode]edit\n" # Quick edit from curses.
bind P macro "[line-mode]Print\n" # Show me all the headers.
bind R macro "[line-mode]reply -ei " # Reply with inclusion and edit.
bind A macro "R[getline]~t\n\CUargv\n" # R to Dan w/auto address fix.
# "cmd" is used to set command line aliases similar to the way "csh"
# does it. The only difference is that "alias" is a reserved word in
# Mush and Mail, so cmd is used.
#
cmd dq 'd \!*; q' # Delete a message list, then quit.
cmd unread 'flags \!* U O' # Mark messages unread.
cmd : curses # Colon now "toggles" curses mode.
# Find messages from mailer-daemon (ignore upper/lower case).
cmd md 'pick -i -f mailer-daemon'
# Because mush can pipe commands to one another, including "cmd"'s, this
# example will delete all messages from mailer-daemon
cmd dmd 'md | delete'
# aliases -- just like Mail's, but you can specify "names"
alias argv Dan Heller <argv@sun.com>
alias bart Bart Schaefer <schaefer@cse.ogi.edu>
alias mush-users Mush Users <mush-users-request@apple.com>