On Fri, Jan 04, 2002 at 07:04:12PM -0700, Rob 'Feztaa' Park wrote:
> Alas! Rob 'Feztaa' Park spake thus:
> > > 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`
> 
> Thanks for your help, guys, this is what I've come up with:
> 
> my .muttrc contains this line:
> 
> source `~/bin/mbox-hooks`

This has been a great discussion.  I didn't know mutt could source the
output of a command.

> and the script is attached.

> #!/bin/bash
...
> # Change back into the previous directory (this outputs text that we don't want)
> cd - > /dev/null 2>&1

This is not necessary.  The command within `s is executed as a child
process of mutt.  Unix child processes cannot affect the working
directory of their parent.  So, none of the cd'ing within the mbox-hooks
command will have any effect on mutt's working directory.

Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |

Reply via email to