On Sun, Oct 21, 2001 at 00:48:59 +0200, Ulf Erikson wrote: > > Byrial -- > > > > % I wrote a patch to Mutt 1.3.2 last year which could expand > > % $$variable or $${variable} in Mutt commands. It was two $ > > I found it/them at: > http://groups.yahoo.com/group/mutt-dev/message/7368 > http://groups.yahoo.com/group/mutt-dev/message/7331 > > The first gives variable expansion but relies on the other which also > gives an if statement of the form: > if variable operator value then-command [else-command] > > Unfortunately the if-statement patch is older.. would be nice if that > one used the $$muttvariable notation such that also $environvariable > could be used in conditions.
The first argument of the if command is (or was) not "$muttvariable", but just "muttvariable". You can use $environvariable and $$muttvariable anywhere in the if command - just like in all other commands - if you use the two patches. The $ and $$ expressions will be expanded before the if command (or any other command) is parsed and executed.