On Mon, Jul 20, 2009 at 09:39:27PM +0100, Christian Ebert wrote: > > The following could be a start, it came up in comp.mail.mutt: > > mailboxes `find ~/Mail -type d \( \( -name cur -o -name new -o -name tmp \) > -prune -o -print \) \ > | tr '\n' ' '` > > (if your find has -printf you can get rid of the tr call) > > It still lists directories that contain Maildirs, haven't found > an elegant way to get rid of those. Personally I just use printf.
The find I have does have printf ... I took a look at that, but it's easier for me to write a program in C for this than to figure out how to do it with find :) I've posted it in this thread; maybe you have use for it. It's non-trivial, but pretty elegant --- I love C ... (BTW, the counter for "strange directories" in the program dosn't count right; I've changed it so that the number doesn't get printed anymore. It would be somewhat tricky to get it to count right. But it doesn't matter much, it's working.) > To update your mailboxes you could put that command in a file and > then have a macro that does something like > > unmailboxes * ; source mailboxes.muttrc Maybe it's possible to somehow pipe the output of the program into mutt so that a file with mailboxes lines isn't even needed. I'll see if I can find that out ...