Hello mutters,

after using mutt more than three months now, I am very pleased with it.
It does nearly everything I want it to (and every day a bit more).

One thing I haven't found out until today, was an automated way of
finding maildir-style mailboxes. All solutions I found so far used
mbox-style mailboxes. I tried it myself many times over the last months
an today I finally found a solution and I want to share it:

find $HOME/mail -path *cur -printf %P | sed 's/\/cur/ =/g;s/^/=/'

That's it. Small and clean. Small explanation for those who do not speak
sed as their native tongue (including myself, but using vim for some
months as an editor sed slowly loses some of its mysteries .-)

- start searching under $HOME/mail
- look for "cur" in path
- if found print path without $HOME/mail in front (%P)
- sed looks for "/cur" and replaces it with " ="
- now all mailboxes are correct prefixed inspite the first one 
- the second sed expression starting after ";" corrects that

The full commandline for the muttrc:
mailboxes `find ...`

Any comments, suggestions and improvements greatly appreciated.

-- 
BNCU
Marcus

Attachment: msg22478/pgp00000.pgp
Description: PGP signature

Reply via email to