From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9316 invoked from network); 25 Feb 2009 20:40:18 -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; 25 Feb 2009 20:40:18 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 33560 invoked from network); 25 Feb 2009 20:40:13 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Feb 2009 20:40:13 -0000 Received: (qmail 9711 invoked by alias); 25 Feb 2009 20:40:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26605 Received: (qmail 9699 invoked from network); 25 Feb 2009 20:40:06 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 25 Feb 2009 20:40:06 -0000 Received: from mtaout03-winn.ispmail.ntl.com (mtaout03-winn.ispmail.ntl.com [81.103.221.49]) by bifrost.dotsrc.org (Postfix) with ESMTP id E74D88058F83 for ; Wed, 25 Feb 2009 21:40:03 +0100 (CET) Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090225204003.DDL7670.mtaout03-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Wed, 25 Feb 2009 20:40:03 +0000 Received: from pws-pc ([81.107.42.185]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090225204003.DPWK22934.aamtaout04-winn.ispmail.ntl.com@pws-pc> for ; Wed, 25 Feb 2009 20:40:03 +0000 Date: Wed, 25 Feb 2009 20:39:49 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: globcomplete desctroys file completion Message-ID: <20090225203949.5e203b85@pws-pc> In-Reply-To: <090221165745.ZM13030@torch.brasslantern.com> References: <090221111624.ZM12907@torch.brasslantern.com> <090221165745.ZM13030@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.0 c=1 a=nG2aHaXk2esA:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=Zk_5I5XMtmkxg66JpSQA:9 a=jOV9GO6peWPnyd4fa9yYJM15CDwA:4 a=LY0hPdMaydYA:10 a=I6wTmPyJxzYA:10 a=_dQi-Dcv4p4A:10 X-Virus-Scanned: ClamAV 0.92.1/9047/Wed Feb 25 11:59:41 2009 on bifrost X-Virus-Status: Clean On Sat, 21 Feb 2009 16:57:45 -0800 Bart Schaefer wrote: > However, I suspect using $i there is only working in this specific > example and not in the general case. The resulting compadd looks > like (line break added for readability): > > compadd -Qf -J -default- -J -default- -p Tmp/ -s '' -W Tmp/ \ > -M 'r:|/=* r:|=*' -s /temp - texlive/temp > > (and similarly for all the other files in texlive and texlive2008). > That looks wrong to me in any case because the description of -W > indicates that it's used "together with" -p ... but also note that > we have two -s options, so something is rotten in tmp4 at line 668, > is it not? Indeed, comparing with the code in 4.2 (before the $Uopt stuff was added) suggests it should probably be something like the following anyway, though I don't have the set-up to test whether it helps here. Index: Completion/Unix/Type/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v retrieving revision 1.42 diff -u -r1.42 _path_files --- Completion/Unix/Type/_path_files 29 Jan 2009 17:58:30 -0000 1.42 +++ Completion/Unix/Type/_path_files 25 Feb 2009 20:37:16 -0000 @@ -665,10 +665,16 @@ else # We are inserting the match into the command line. if [[ "$tmp3" = */* ]]; then - tmp4=( $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" - -s "${Uopt:+$ISUFFIX}" + if [[ -n $Uopt ]]; then + tmp4=( -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" + -s "$ISUFFIX" -W "$prepath$realpath$testpath" "$pfxsfx[@]" $Mopts ) + else + tmp4=( -Qf "$mopts[@]" -p "$linepath$tmp2" + -W "$prepath$realpath$testpath" + "$pfxsfx[@]" $Mopts ) + fi if [[ -z "$listsfx" ]]; then for i in "$tmp1[@]"; do tmpdisp=("${i%%/*}") -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/