From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10741 invoked from network); 10 Mar 2009 18:20:07 -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 18:20:07 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 6890 invoked from network); 10 Mar 2009 18:18:29 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Mar 2009 18:18:29 -0000 Received: (qmail 3775 invoked by alias); 10 Mar 2009 18:18:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26711 Received: (qmail 3761 invoked from network); 10 Mar 2009 18:18:25 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 10 Mar 2009 18:18:25 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [85.115.60.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id CC2D280307F9 for ; Tue, 10 Mar 2009 19:18:21 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly07d.srv.mailcontrol.com (MailControl) with ESMTP id n2AIIJ8s010707 for ; Tue, 10 Mar 2009 18:18:19 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Tue, 10 Mar 2009 18:18:18 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id n2AIIJ98010997 for ; Tue, 10 Mar 2009 18:18:19 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id n2AIIIFk010993 for ; Tue, 10 Mar 2009 18:18:19 GMT Message-Id: <200903101818.n2AIIIFk010993@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers Subject: Re: setopt globcomplete and () broken In-reply-to: <237967ef0903101104y135e0ca6sdbd9fbe8272f2d99@mail.gmail.com> References: <237967ef0903100625s7e8e5908t7852ade0c1d6d8d3@mail.gmail.com> <20090310135146.30c0c794@news01> <20090310173424.1af302c5@news01> <237967ef0903101104y135e0ca6sdbd9fbe8272f2d99@mail.gmail.com> Comments: In-reply-to Mikael Magnusson message dated "Tue, 10 Mar 2009 19:04:54 +0100." Date: Tue, 10 Mar 2009 18:18:18 +0000 From: Peter Stephenson X-OriginalArrivalTime: 10 Mar 2009 18:18:18.0904 (UTC) FILETIME=[968D0180:01C9A1AC] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.68.0.117 X-Virus-Scanned: ClamAV 0.92.1/9084/Tue Mar 10 08:11:13 2009 on bifrost X-Virus-Status: Clean Mikael Magnusson wrote: > If I unsetopt globcomplete, I can ls *zshenv(D) with the > paragraph deleted though, so it all seems a bit crazy to me. Are you sure that's not going through _expand? If I remove _expand from the list of completers, I don't get completions for things like *zshe*(D) unless glob_complete is set. > I thought > globcomplete was about completing things with patterns that weren't > files in the first place, so why do glob qualifiers come into the > picture at all? They're not *necessarily* files, but they could be anything; and if they are files, then globcomplete means exactly what it says, complete based on full file glob expressions. > And when completing actual files, why would globcomplete mean > _path_files has to do extra work instead of just expanding the > pattern? The extra work in this particular case is merging together glob qualifiers passed down (e.g. "-/" becoming "*(-/)") with any that are there on the command line. This is a rather specialised thing to do, but you could e.g. complete "cd *(D)" and get files with dots. (It only applies with glob_complete because otherwise what's on the command line is a plain string and you can just use "*(-/)" as the pattern.) This does appear to work. (In fact it appears to work even after the fix I was going to propose for your original problem, which is encouraging.) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070