Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: problem with context specification



On 1/13/20, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Mon, 2020-01-13 at 17:46 +0100, Pier Paolo Grassi wrote:
>> For the episodes command I would like to override this style, and set it
>> to:
>>
>> zstyle ':completion:*:*:episodes:*:*' matcher-list 'm:{a-z}={A-Za-z}
>> l:|=*
>> r:|=*'
>>
>> but this doesn't seem to match when i try completion pressing tab after
>> the
>> episodes command.
>
> I've a feeling matcher-list is only run in a very general context, so
> updating per command doesn't work, and you need to use the matcher style
> for more specific cases.  However, I may not be remembering the two
> styles where this applies correctly, and the documentation doesn't
> explicitly say where the two work and don't work.

You're correct, the documentation for tag-order says:
"The matcher-list style offers something similar, but it is tested
very early in the completion system and hence can’t be set for single
commands nor for more specific contexts."

But arguably it could say this in the documentation for matcher-list instead.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author