Re: Is there a way to have mutt automatically run a script at
On Thu, Dec 25, 2008 at 09:14:02PM EST, Kyle Wheeler wrote:
> On Thursday, December 25 at 07:56 PM, quoth Chris Jones:
> >`ls > /tmp/ls`
> >
> >.. in my .muttrc .. and despite an error message to the effect that the
> >command doesn't exist .. it actually works.
>
> The reason it generates the error is because mutt doesn't ignore empty
> strings. Therefore, it's trying to interpret the empty string as if it
> was a command. You can silence the error like so:
>
> set my_junk=`ls > /tmp/ls`
>
> ~Kyle
Thanks .. I must be particularly thick today..
I clearly am clueless as to how mutt's parser operates .. but where's
the empty string?
Do you mean that once `ls > /tmp/ls` is executed there is nothing left
since the output of the command is redirected to a file?
How is that different from an empty line in the .muttrc?
Also, since the underscore is a pain to type, I had initially entered:
'set myjunk=`ls > /tmp/ls`
And that gave me a different error message when I restared mutt: 'line
111: myjunk: unknown variable'.. and in this case, the contents of
/tmp/ls were _not_ modified.
Does mutt's config file syntax actually require that user variable names
contain an underscore?
Or is it that there is something special about the "my_junk" variable?
Thanks,
CJ