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

Re: use script output as regex pattern in folder-fook



On Jul 25 17:32, Rocco Rutte wrote:
> Hi,
>
> * Steve S wrote:
>
>> I have tried
>
>>    set my_muttdir=$HOME/.mutt
>>    folder-hook `$my_muttdir/script.sh` ...
>
>> Here, Mutt doesn't seem to expand $my_muttdir before handing the command over
>> to the shell. Is there a trick to do that?
>
> It doesn't seem so. At least for interactive shell-escape function it's  
> documented that these variables aren't expanded... and I assume the same  
> is true for backtick expansion.
>

OK, then I'll set an env var MUTTDIR and do

    folder-hook `$MUTTDIR/script.sh` ...

A more elegant solution could be a config var $configdir or $scriptdir for
people who 

    - have more then one script laying around in ~/.mutt (or wherever) 
    - don't want to put Mutt-specific scripts in a location on $PATH

My 0.02 $.

steve