From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 26030 invoked from network); 28 Apr 2020 20:22:13 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 28 Apr 2020 20:22:13 -0000 Received: (qmail 16313 invoked by alias); 28 Apr 2020 20:22:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45740 Received: (qmail 19281 invoked by uid 1010); 28 Apr 2020 20:22:03 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25793. spamassassin: 3.4.4. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 4.694568 secs); 28 Apr 2020 20:22:03 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedriedugddugeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepfdffrghnihgvlhcuufhhrghhrghffdcuoegurdhssegu rghnihgvlhdrshhhrghhrghfrdhnrghmvgeqnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgr mhgv X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-dev0-351-g9981f4f-fmstable-20200421v1 Mime-Version: 1.0 Message-Id: In-Reply-To: <15DD8A28-EFDB-4F29-BCEB-AA649722FEA9@dana.is> References: <20200427101430.447e2a21@tarpaulin.shahaf.local2> <20200428190601.0f0c8503@tarpaulin.shahaf.local2> <15DD8A28-EFDB-4F29-BCEB-AA649722FEA9@dana.is> Date: Tue, 28 Apr 2020 20:20:48 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: Re: zstyle: "more specific" patterns and *-components Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable dana wrote on Tue, 28 Apr 2020 19:30 +00:00: > On 28 Apr 2020, at 14:06, Daniel Shahaf wrote= : > > I don't immediately see the rationale behind your proposed scoring. = The > > two patterns you mention, =C2=AB:foo=C2=BB and =C2=AB:foo:*=C2=BB, d= on't seem parallel to > > each other, since there's no possible context that can be matched by= > > both of them. >=20 > Well, the example i gave was :foo: vs :foo:*, not :foo vs :foo:*. >=20 Ah, sorry. My guess for why * is weighted zero is what Mikael said. Note that =C2=AB:foo:=C2=BB is scored as 3 constant strings ("" "foo" ""), so it o= utscores =C2=AB:foo:*=C2=BB and would do so even if the pattern =C2=AB*=C2=BB wer= en't special cased compared to other patterns. > But you're right, anyway. I was too focussed on my issue with the * pa= tterns > to see the much simpler and more general fix re: the number of compone= nts. > Just looking at it, i think what you're suggesting addresses everythin= g, ty *nod* Cheers, Daniel