on Tue,07 Aug 2001, Ricardo SIGNES wrote:

> Greetings.
> 
> I'd like to set up a folder hook so that when entering a folder that looks 
> like "=bar/foo", my From is set to "[EMAIL PROTECTED]"
> 
> While I know I can do this pretty easily with one folder hook per folder,
> I wonder if I can use regex to simplify it.  For example, something like
> 
> folder-hook /=(\d+)/(\d)+/ set from_addr="samael-$2@$1.manxome.org"
> 
> (I know this is probably quite wrong.  I have less-than-extensive 
> experience with mutt regex and hooks.  I wrote my muttrc and forgot about
> it -- but I remember basically how it works.
> 
> I assume going back to normal can be handled with a simple !pattern...
> 

I could certainly make use of backreferences and in the process eliminate
over 100 hooks in my muttrc.  I don't think there's a way of doing what
you're describing - but I'd really appreciate it if I were proven wrong ;-)

Chris

--
   We are not who we think we are. We are not who others think we are. We
   are who we think others think we are. -Anonymous

Reply via email to