From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6816 invoked from network); 10 Mar 2009 17:36:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Mar 2009 17:36:22 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 93755 invoked from network); 10 Mar 2009 17:34:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Mar 2009 17:34:41 -0000 Received: (qmail 13614 invoked by alias); 10 Mar 2009 17:34:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26709 Received: (qmail 13600 invoked from network); 10 Mar 2009 17:34:34 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 10 Mar 2009 17:34:34 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [208.87.233.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 4B55780307F8 for ; Tue, 10 Mar 2009 18:34:29 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly29g.srv.mailcontrol.com (MailControl) with ESMTP id n2AHYPAP006361 for ; Tue, 10 Mar 2009 17:34:26 GMT Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Tue, 10 Mar 2009 17:34:24 +0000 Date: Tue, 10 Mar 2009 17:34:24 +0000 From: Peter Stephenson To: zsh-workers Subject: Re: setopt globcomplete and () broken Message-ID: <20090310173424.1af302c5@news01> In-Reply-To: <20090310135146.30c0c794@news01> References: <237967ef0903100625s7e8e5908t7852ade0c1d6d8d3@mail.gmail.com> <20090310135146.30c0c794@news01> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Mar 2009 17:34:24.0863 (UTC) FILETIME=[748A3EF0:01C9A1A6] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.71.0.139 X-Virus-Scanned: ClamAV 0.92.1/9084/Tue Mar 10 08:11:13 2009 on bifrost X-Virus-Status: Clean On Tue, 10 Mar 2009 13:51:46 +0000 Peter Stephenson wrote: > elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then > tmp2=( "$tmp2[@]" "${match[1]}((${tmp3}${match[2][3,-1]}" ) I thought I was on the way to understanding what was going on here, but this attempt to match some form of glob qualifiers has stumped me. Why are we specially matching a pattern ending with glob qualifiers wrapped in double parentheses? What we're matching against, $tmp1, comes from patterns supplied to _files or _path_files as an argument; I can't see any sign the double parentheses are used, and the expansion manual says A glob subexpression that would normally be taken as glob qualifiers, for example (^x), can be forced to be treated as part of the glob pattern by doubling the parentheses, in this case producing ((^x)). Yet we are treating it as if it's a glob expression ($tmp3 is the new glob qualifier we are trying to insinuate into the list). Can I simply hold my breath until it goes away? -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070