Alas! David Champion spake thus: > > > and just source .muttrc-auto from .muttrc. Ugly but would work. > > > > Interesting idea. I'm sure I've seen a better way to do it, though. > > Perhaps I'll have to search the archives :) > > I'm into overkill today. > > You could put that in a script such as the one I've attached, and run > it from .muttrc like this: > > source `$HOME/bin/mutt-prep folders=$HOME/mail` > > This approach lets your mutt-prep script write anything muttrc-ish on > its stdout, and mutt will absorb it with no shell wrappers. The cmdline > eval lets your source line configure the script's parameters easily. > (You could do it with prefixed variables or /bin/env, but this makes > them local instead of environmental, fwiw, and it might be easier to > read.) > > It's fundamentally the same idea, but you don't have to mess with > wrappers, at least. It feels a little neater, in some way I can't > explain.
Well, I had a bit of a hard time following your script, but based on the
pine addressbook bit, I take it it doesn't do _quite_ what I'm looking
for... but it gave me an idea (not sure if this is what you were already
doing...): Would it be possible to write a script that simply writes
muttrc stuff to a file, and the writes the filename to stdout? That way
I'd still be avoiding the wrapper. I'm going to try that, I'll let you
know the results :)
> ## This emits muttrc commands on stdout. call it with
> ## source `/path/to/mutt-prep`
> ## in your .muttrc file.
Now I'm just confused... so you're saying that the end result would be
this:
source mbox-hook =folder "=archives/`date +%Y-%m`-folder"
??
Can source take muttrc commands? I thought source only took filenames.
--
Rob 'Feztaa' Park
[EMAIL PROTECTED]
--
"It takes 5 NT servers to offer the performance and availability of
a single UNIX server."
-- Network Computing, July 15 1998
msg22296/pgp00000.pgp
Description: PGP signature
