<<< Date Index >>>     <<< Thread Index >>>

Re: backticks in muttrc



David Ellement [ellement@xxxxxxxxxx] wrote:
> On 2004-01-25, Bob McElrath wrote
> > This command should work:
> > 
> > fcc-save-hook "~s (.*)" =`perl -e '$_="%s"; s/\[([A-Za-z0-9 _]+)\].*/$1/; 
> > print;'`
> > 
> > but it does not.  What about backtick evaluation is preventing this
> > from working?
> 
> Without single quotes around the backtick expression, the expression
> will be evaluated at the time the line is parsed; within a hook, it is
> likely that the intent is to defer evaluation until the hook is
> activated.

With single quotes it doesn't get evaluated at all.

I wish this worked, but it does not:
    fcc-save-hook "~s (.*)" =$1

Note that this does work:
    fcc-save-hook "~s (.*)" =`echo %s`

but fails when the RHS is more complicated.

Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]

Attachment: signature.asc
Description: Digital signature