From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23075 invoked from network); 10 Mar 2009 18:32:01 -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.6 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:32:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 11050 invoked from network); 10 Mar 2009 18:30:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Mar 2009 18:30:25 -0000 Received: (qmail 9298 invoked by alias); 10 Mar 2009 18:30:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26712 Received: (qmail 9288 invoked from network); 10 Mar 2009 18:30:19 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 10 Mar 2009 18:30:19 -0000 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by bifrost.dotsrc.org (Postfix) with ESMTP id EB5A580307F8 for ; Tue, 10 Mar 2009 19:30:15 +0100 (CET) Received: by ey-out-2122.google.com with SMTP id d26so265195eyd.3 for ; Tue, 10 Mar 2009 11:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=T8qBSQaBB1kVDD8jn0SkZIhRBuToRHrvAeys5+dGflk=; b=Edz2T9tu5ckiDbRjCsM/XUT3fgDj/gDaFWWWaAjQ1pyVV8/EwtyGECg4am0C66HJop mx/EQHp/YuAKVLrUaPZ3xEgtL57eBa22fRKU/AlIY2iekFdH8vHrDIJc9sMlk/BeiHnR EzgttKV5g04Rkm6gyAzOH1wj11DuO3wxHJVH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=nerECdZlouACVLrNMS+VDOsmxws8ewBy5lSf+xGS5Uh4npdEFGT/d+500oIp9Z64Th TTciSRRsE5BGQPZJFpXUJiKDOob6mjPbmIUwgl2GZjXScBeRjbNf4floCHllzc2K8GRT 5zD4I8Br8zBkqAHOe9z8IN4nNRCrEo8QCNDdo= MIME-Version: 1.0 Received: by 10.210.63.18 with SMTP id l18mr1179593eba.9.1236709815637; Tue, 10 Mar 2009 11:30:15 -0700 (PDT) In-Reply-To: <200903101818.n2AIIIFk010993@news01.csr.com> References: <237967ef0903100625s7e8e5908t7852ade0c1d6d8d3@mail.gmail.com> <20090310135146.30c0c794@news01> <20090310173424.1af302c5@news01> <237967ef0903101104y135e0ca6sdbd9fbe8272f2d99@mail.gmail.com> <200903101818.n2AIIIFk010993@news01.csr.com> Date: Tue, 10 Mar 2009 19:30:15 +0100 Message-ID: <237967ef0903101130j64c71c88r9c8e234d000fc351@mail.gmail.com> Subject: Re: setopt globcomplete and () broken From: Mikael Magnusson To: zsh-workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/9084/Tue Mar 10 08:11:13 2009 on bifrost X-Virus-Status: Clean 2009/3/10 Peter Stephenson : > 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. Well, as i wrote further down my completer list is _oldlist _complete _correct, i don't know if that is a yes or a no :). >> 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. Okay, so I was testing if ls --*e(#e) worked with globcomplete on, which it does (ie it only lists options ending in 'e'). But since I forgot which flag meant end of string, i pressed tab at the #, but got _path_files:25: command not found: _globflags printed 5 or 6 times, if I run autoload _globflags it works. This seems odd to me since _globquals seems to work without any special treatment. >> 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.) Okay, there is probably a whole level of stuff going on here that I wasn't even aware of. -- Mikael Magnusson