From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6655 invoked from network); 16 Jun 2008 16:53:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Jun 2008 16:53:33 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 45957 invoked from network); 16 Jun 2008 16:53:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Jun 2008 16:53:26 -0000 Received: (qmail 6978 invoked by alias); 16 Jun 2008 16:53:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25165 Received: (qmail 6961 invoked from network); 16 Jun 2008 16:53:22 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 16 Jun 2008 16:53:22 -0000 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id EED1E8028AC3 for ; Mon, 16 Jun 2008 18:53:10 +0200 (CEST) Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20080616165741.MUOB7070.mtaout02-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Mon, 16 Jun 2008 17:57:41 +0100 Received: from pws-pc.ntlworld.com ([81.107.40.67]) by aamtaout01-winn.ispmail.ntl.com with ESMTP id <20080616165854.VSFO16854.aamtaout01-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Mon, 16 Jun 2008 17:58:54 +0100 Received: from pws-pc (pws-pc [127.0.0.1]) by pws-pc.ntlworld.com (8.14.2/8.14.2) with ESMTP id m5GGqnVh010847 for ; Mon, 16 Jun 2008 17:52:50 +0100 Message-Id: <200806161652.m5GGqnVh010847@pws-pc.ntlworld.com> From: Peter Stephenson To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: rewrite of completion matching In-Reply-To: Message from Bart Schaefer of "Mon, 16 Jun 2008 08:30:35 PDT." <080616083035.ZM9365@torch.brasslantern.com> Date: Mon, 16 Jun 2008 17:52:49 +0100 X-Virus-Scanned: ClamAV 0.92.1/7489/Mon Jun 16 16:51:24 2008 on bifrost X-Virus-Status: Clean Bart Schaefer wrote: > OK, then what do each of the following mean, and how could I figure it > out from the documentation? Well, by reading it, obviously. Here's what I think it says, please tell me if you think it says something different and what I should do about it since there's no point in me simply playing guessing games about what you think it should say. - [:lower:] matches [:upper:] explicitly for one pair of characters (a/A) and vice versa. This is the only really useful case for correspondence classes. (Consequently, quite possibly this is the only one worth mentioning under the heading of correspondence classes to avoid complicating the issue.) - [:ANY:] matches [:ANY:] explicitly character by character (X matches X for any X that matches [:ANY:]) - Anything else is no different from character classes on the appropriate side. The only particular caes are: > m:{[:lower:]0-9}={[:upper:][:digit:]} 0-9 vs. [:digit:] isn't documented as working, so avoid. I think I know what it does but it doesn't appear useful and I don't want people using it. > m:{[:lower:][:digit:]}={[:alnum:]} The hanging [:digit:] is treated as an ordinary character class; that's already documented for bits left over in correspondence classes. > } I missed a special case, in fact: if the classes are the same, > } then the character is forced to be the same as well. > > So m:{[:alnum:]}={[:alnum:]} is effectively an expensive no-op? In that it doesn't give you behaviour beyond what completion would do with a match specifier, yes. Although m:{[:alnum:][:upper:]}={[:alnum:][:lower:]} is of very minor interest (match lower against upper provided some alphanumeric, not specified but forced to be the same on both sides, occurred in the previous character), and it's hard to think of good use in practice. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/