zsh-users
 help / color / mirror / code / Atom feed
* Explain my matcher-list style to me :-)
@ 2015-12-08 22:31 Bart Schaefer
  2015-12-09  9:52 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2015-12-08 22:31 UTC (permalink / raw)
  To: zsh-users

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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Explain my matcher-list style to me :-)
  2015-12-08 22:31 Explain my matcher-list style to me :-) Bart Schaefer
@ 2015-12-09  9:52 ` Peter Stephenson
  2015-12-09 21:04   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2015-12-09  9:52 UTC (permalink / raw)
  To: zsh-users

On Tue, 08 Dec 2015 14:31:50 -0800
Bart Schaefer <schaefer@brasslantern.com> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Explain my matcher-list style to me :-)
  2015-12-09  9:52 ` Peter Stephenson
@ 2015-12-09 21:04   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2015-12-09 21:04 UTC (permalink / raw)
  To: zsh-users

On Dec 9,  9:52am, Peter Stephenson wrote:
}
} So if you type foo then the effect of l:|=* means it will match *foo
} against the possibilities, together with the other modifications.

OK, that does seem to be it.  With

zstyle ':completion:*' matcher-list 'r:|[-._,]=** r:|=**'

I get no matches for

% ls g.<TAB>

But with

zstyle ':completion:*' matcher-list 'r:|[-._,]=** r:|=** l:|=*'

I get

% ls g.<TAB>
% ls config.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-09 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 22:31 Explain my matcher-list style to me :-) Bart Schaefer
2015-12-09  9:52 ` Peter Stephenson
2015-12-09 21:04   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).