From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6774 invoked from network); 16 Jun 2008 12:54:38 -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 12:54:38 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 76790 invoked from network); 16 Jun 2008 12:54:33 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Jun 2008 12:54:33 -0000 Received: (qmail 10593 invoked by alias); 16 Jun 2008 12:54:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25159 Received: (qmail 10580 invoked from network); 16 Jun 2008 12:54:31 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 16 Jun 2008 12:54:31 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id 9778F8028AC3 for ; Mon, 16 Jun 2008 14:54:22 +0200 (CEST) Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080616125839.OLZW28496.mtaout01-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Mon, 16 Jun 2008 13:58:39 +0100 Received: from pws-pc ([81.107.40.67]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20080616125428.YQJY18637.aamtaout04-winn.ispmail.ntl.com@pws-pc> for ; Mon, 16 Jun 2008 13:54:28 +0100 Date: Mon, 16 Jun 2008 13:54:05 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: rewrite of completion matching Message-ID: <20080616135405.7a2a816e@pws-pc> In-Reply-To: <080616001700.ZM8326@torch.brasslantern.com> References: <10676.1212870878@pws-pc> <080616001700.ZM8326@torch.brasslantern.com> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.10; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/7488/Mon Jun 16 08:06:58 2008 on bifrost X-Virus-Status: Clean On Mon, 16 Jun 2008 00:17:00 -0700 Bart Schaefer wrote: > I *think* you mean that m:{[:punct:]}={[:space:]} is "any single > punctuation character matches any single whitespace character," > whereas m:{[:lower:]}={[:upper:]} is "each lower case character > matches the corresponding upper case character." That is, the former > works like "sed 's/[[:punct:]]/[[:space:]]/g'" but the latter works > like "tr '[:lower:]' '[:upper:]'". Yes. I missed a special case, in fact: if the classes are the same, then the character is forced to be the same as well. (If you don't want that, obviously you should use ordinary character classes.) Index: Doc/Zsh/compwid.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compwid.yo,v retrieving revision 1.41 diff -u -r1.41 compwid.yo --- Doc/Zsh/compwid.yo 8 Jun 2008 17:53:55 -0000 1.41 +++ Doc/Zsh/compwid.yo 16 Jun 2008 12:52:25 -0000 @@ -944,8 +944,12 @@ to be a future extension, at which point this syntax will handle arbitrary alphabets; hence this form, rather than the use of explicit ranges, is the recommended form. In other cases -`tt([:)var(name)tt(:])' forms are allowed, but imply no special -constraint on the characters beyond that implied by the test itself. +`tt([:)var(name)tt(:])' forms are allowed. If the two forms on the left +and right are the same, the characters must match exactly. In remaining +cases, the corresponding tests are applied to both characters, but they +are not otherwise constrained; any matching character in one set goes +with any matching character in the other set: this is equivalent to the +behaviour of ordinary character classes. The pattern var(tpat) may also be one or two stars, `tt(*)' or `tt(**)'. This means that the pattern on the command line can match -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/