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

Re: mutt/2140: message-hook and patterns, [: invalid command



I'm using 1.5.9i (debian: 1.5.9-2sarge2) and have noticed what seems to
be a similar problem with the folder-hook command.

When trying to set something like this:

folder-hook . set index_format="%F %C"

on startup I get this error:

%C: unknown variable

The problem appears to be the space directly in front of the %C.  If the
space is removed the command works properly, even if the output is ugly.
After searching the Internet I found some examples that seemed to work,
namely:

folder-hook . 'set index_format="%F %c"'

The command is wrapped in single quotes and everything works fine.
This also seems to work:

folder-hook . set index_format="%F\\ %c"

If this is correct behaviour (which it seems like it is), then it should
probably be noted in the man page and/or manual that an extra pass of
translation is performed with <command> on hook directives (and maybe
other places?).

It would be especially helpful if the documentation contained an example
demonstrating the single-quote wrapping and/or extra quoting required.

Ben

-- 
Ben Love
blove+signature (at) kylimar.com  ||  ASCII ribbon campaign - ()
http://www.kylimar.com/           ||   against HTML e-mail  - /\

Attachment: signature.asc
Description: Digital signature