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

Re: Explain my matcher-list style to me :-)



On Tue, 08 Dec 2015 14:31:50 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> A very long time ago I copied this matcher-list style out of a zsh-users
> thread.  Unfortunately I've lost track of that thread, and there's no
> good way to search archives for strings like "l:|=*".
> 
> zstyle ':completion:*' matcher-list '' 'r:|[-._,]=** r:|=**' \
>     'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._,]=** r:|=**' \
>     'r:|[-._,]=** r:|=** l:|=*'
> 
> I understand thee first three:
> 
> ''
> 'r:|[-._,]=** r:|=**'
> 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._,]=** r:|=**'
> 
> But I've forgotten what is gained by adding the l:|=* pattern in that
> final one.  How does it differ from the second one?

I think it means you get the effect of a "*" right at the start of the
trial completion.

I've now realised, I think, that "trial completion" in the documentation
doesn't mean what I thought it was (i.e. one of the list of
possibilities) --- it means the pattern formed by applying matching
control to what you type which is then matched against one of the list
of possibilities.

So if you type foo then the effect of l:|=* means it will match *foo
against the possibilities, together with the other modifications.

Maybe.

pws



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