Marius Strom wrote:
> Better to use ls -1. You bypass a lot of fstat() calls when doing the
> ls -l, you probably don't need the -a (unless you have boxes that start
> with a "."), and by doing ls -1 you bypass the need for the awk command.
>
> ls -1 $HOME/mail/* | grep -v sent
>
> Much better, and more efficient on a large mailbox structure.
That scheme could get ugly if you happen to have an MH mailbox in
$HOME/mail like I do. ;o) I really don't want a bunch of numerically
named files mistakenly declared in the mailboxes command. Eliminating
the asterisk ("*") might be more proper; then it won't descend into
subdirectories. ("ls -1 $HOME/mail/ | grep -v sent")
My solution is this: Like many others, I adopt a naming convention in
which all mailboxes receiving incoming email start with "IN.", e.g.
IN.work gets all email addressed to my work email account, etc. This
does three things for me:
1. My incoming mailboxes are all listed together in the file browser.
2. My incoming mailboxes are listed first, since capital letters
come before lowercase and I avoid capital letters in the mailbox
names.
3. I can use the IN\..* pattern for folder-hooks, etc.
So, to include my spool mailbox ($spool) and all =IN\..* mailboxes in the
mailboxes declaration, I use this in ~/.muttrc :
mailboxes ! `echo $HOME/Mail/IN.*` # $spool and =IN\..* receive incoming mail.
The only problem I have with this is that the nice little message
telling me I have new mail in any newly created mailboxes isn't active
until the next time I startup Mutt (or :source .muttrc).
-- Mr. Wade
--
Linux: The Choice of the GNU Generation