mutt/2140: message-hook and patterns, [: invalid command
>Number: 2140
>Notify-List: 336708@xxxxxxxxxxxxxxx
>Category: mutt
>Synopsis: message-hook and patterns, [: invalid command
>Confidential: no
>Severity: normal
>Priority: medium
>Responsible: mutt-dev
>State: open
>Keywords:
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 21 21:54:35 +0100 2005
>Originator: Brian Clark
>Release: 1.5.11
>Organization:
>Environment:
>Description:
Forwarding from Debian's #336708:
--
After upgrading to Mutt 1.5.11-2, when starting mutt, I get the error:
--->8---
Error in /home/brian/.mutt/rc.private, line 62: [: invalid command
Error in /home/brian/.muttrc, line 4: source: errors in
/home/brian/.mutt/rc.private
source: errors in /home/brian/.muttrc
Press any key to continue...
---8<---
Line 62 of /home/brian/.mutt/rc.private contains the following:
message-hook "~h X-Spam-Status:.*hits=[0-9]+" "unignore X-Spam-Status"
Previously worked with 1.5.9.
--
Answer from Alain Bench:
--
Confirmed problem with stock 1.5.11, while 1.5.9 and 1.5.10 do work.
This might be due to the new =x string matching patterns, so perhaps bug
should be upstreamed so Brendan can comment (if he's there). In the
meantime, as a workaround, you can prepend the "=" with 2 backslashes,
like this:
| message-hook "~h X-Spam-Status:.*hits\\=[0-9]+" "unignore X-Spam-Status"
This syntax is backward compatible.
--
If the incompatible change has to stay, perhaps it would have to be documented?
>How-To-Repeat:
>Fix:
Unknown
>Add-To-Audit-Trail:
>Unformatted: