From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: zstyle: "more specific" patterns and *-components
Date: Tue, 28 Apr 2020 20:20:48 +0000 [thread overview]
Message-ID: <a72f4cd4-597f-47dd-adc7-09764f798be8@www.fastmail.com> (raw)
In-Reply-To: <15DD8A28-EFDB-4F29-BCEB-AA649722FEA9@dana.is>
dana wrote on Tue, 28 Apr 2020 19:30 +00:00:
> On 28 Apr 2020, at 14:06, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> > I don't immediately see the rationale behind your proposed scoring. The
> > two patterns you mention, «:foo» and «:foo:*», don't seem parallel to
> > each other, since there's no possible context that can be matched by
> > both of them.
>
> Well, the example i gave was :foo: vs :foo:*, not :foo vs :foo:*.
>
Ah, sorry.
My guess for why * is weighted zero is what Mikael said. Note that
«:foo:» is scored as 3 constant strings ("" "foo" ""), so it outscores
«:foo:*» and would do so even if the pattern «*» weren't special cased
compared to other patterns.
> But you're right, anyway. I was too focussed on my issue with the * patterns
> to see the much simpler and more general fix re: the number of components.
> Just looking at it, i think what you're suggesting addresses everything, ty
*nod*
Cheers,
Daniel
next prev parent reply other threads:[~2020-04-28 20:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 10:14 Daniel Shahaf
2020-04-27 16:10 ` Roman Perepelitsa
2020-04-27 17:38 ` Mikael Magnusson
2020-04-28 19:06 ` Daniel Shahaf
2020-04-28 19:30 ` dana
2020-04-28 20:20 ` Daniel Shahaf [this message]
2020-04-27 18:54 ` dana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a72f4cd4-597f-47dd-adc7-09764f798be8@www.fastmail.com \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).