On Tue, Jan 01, 2002 at 11:07:08PM -0700, Rob 'Feztaa' Park <[EMAIL PROTECTED]> wrote: | Hey all. I was just wondering if there was some way that I could get | mutt to automatically set up my mbox hooks for every folder in my ~/mail | directory, so that way I can subscribe to a new mailing list without | having to edit my .muttrc. | | Right now I've got this set up: | | mbox-hook =spam "=archives/`date +%Y-%m`-spam" | mbox-hook =inbox "=archives/`date +%Y-%m`-inbox" | ... | | (and so on for all of my mboxes). I want to automate this so I don't | have to write a new one for all future mailing lists that I might decide | to subscribe to :) | | I'm pretty sure I've seen this done somewhere, but I can't find it.
Well, it's indirect, but you could wrap mutt in a script which said: #!/bin/sh ( cd $HOME/mail when=`date +%Y-%m` for mbox in * do echo "mbox-hook =$mbox \"=archives/$when-$mbox\"" done >$HOME/.muttrc-auto ) exec real-mutt-program ${1+"$@"} and just source .muttrc-auto from .muttrc. Ugly but would work. -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ Will hack Perl code in spite of what my boss might say. - Dave Rensin, <[EMAIL PROTECTED]>