Josh Kramer writes:
JK> If you use tcsh, this handy alias will display a one line message
JK> at your prompt telling you if and at what time new mail has
JK> arrived, or will display nothing if there has been no new mail.
JK> In .cshrc, add the line:
JK> alias precmd 'finger your_username | grep "New mail" | grep -v
JK> "no"'
JK> Replace your_username with your real username, login again, and
JK> you're set.
JK> I hope that this is useful for some people.
Not likely, if you are using procmail to split mail into
separate folders. (; Not all messages are going to go into $MAIL, so
'finger your_username' isn't going to pick up new mail.
My thoughts exactly. Also if I remember tcsh command syntax correctly the
precmd alias will be done _every single time_ a command is executed on that
shell. This would seem to me to really bog down the shell with a whole lot
of finger-ing.
What I do is that since I have setup all mail that is filtered to go to
one directory, I call a script that does a "nfrm" (a patched elm utility that
counts the number of read, new, unread messages in a folder) on my main
mailbox and on each file in my incoming directory (they are all folders).
I have put the command in my login, so when I login I get something like:
You have 12 read messages.
procmail:Folder contains 7 new messages.
tea:Folder contains 3 new messages.
I can also run the script whenever I feel the urge to check for new mail.
If I remember correctly there is a way in tcsh to have a command run every
x minutes (and display its output to the stdout) and this could be one such
command. I believe this is only in tcsh 6.05 and greater. Do a "man tcsh"
for details.
Just my $0.015,
Mark Bynum
bynum(_at_)cs(_dot_)fsu(_dot_)edu
P.S. You could also have "nfrm" display the From: and Subject: lines of
each message if you wanted to.