On Wed, Mar 4, 2009 at 17:18, Kyle Wheeler <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Wednesday, March  4 at 05:01 PM, quoth [email protected]:
>> ~h '^Envelope-to: [email protected]'
>>
>>works when I'm limiting messages once inside the folder, but
>>
>>score '~h '^Envelope-to: [email protected]'' 41
>>
>>in my .muttrc doesn't.
>
> Obviously. It gets parsed as the strings:
>
>     score
>     ~h ^Envelope-to:
>     [email protected]
>     41
>
> The reason is that each ' terminates the quoted string before it. If
> you want embedded quotes, you either have to escape them (which is
> annoying) or you have to use a different kind of quote for the
> embedded version. For example, this would work:
>
>     score '~h "^Envelope-to: [email protected]"' 41
>
> The difference is that mutt's parser will see that as the following
> strings:
>
>     score
>     ~h "^Envelope-to: [email protected]"
>     41
>
> If you had replaced ALL single quotes with double quotes, e.g.:
>
>     score "~h "^Envelope-to: [email protected]"" 41
>
> That would get parsed the exact same way as having all of the quotes
> be single quotes. The key is *mixing* the quotes. You could also use
> double-quotes for the outside string, and it would still work, like
> so:
>
>     score "~h '^Envelope-to: [email protected]'" 41
>
> Here's what I mean by escaping quotes:
>
>     score "~h \"^Envelope-to: [email protected]\"" 41
>
> That way you're telling mutt which quotes should be considered to end
> the string and which are instead *part* of the string. When they're
> read, the backslashes get stripped off, so mutt sees that line like
> this:
>
>     score
>     ~h "^Envelope-to: [email protected]"
>     41
>
> Does that make sense?
>

Well it would make sense if any of your examples worked, but
unfortunately they don't.

I've tried mixing " and ' myself, except for the
escaping-quotes-trick. That's new, but gives me an error message as
well.

Reply via email to