From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5387 invoked from network); 25 Feb 2009 20:49:21 -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:49:21 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 36257 invoked from network); 25 Feb 2009 20:49:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Feb 2009 20:49:16 -0000 Received: (qmail 14031 invoked by alias); 25 Feb 2009 20:49:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26606 Received: (qmail 14013 invoked from network); 25 Feb 2009 20:49:11 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 25 Feb 2009 20:49:11 -0000 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id 36A72805905E for ; Wed, 25 Feb 2009 21:49:08 +0100 (CET) Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090225204900.ZYWQ4080.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Wed, 25 Feb 2009 20:49:00 +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 <20090225204859.DTGT22934.aamtaout04-winn.ispmail.ntl.com@pws-pc> for ; Wed, 25 Feb 2009 20:48:59 +0000 Date: Wed, 25 Feb 2009 20:48:44 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: globcomplete desctroys file completion Message-ID: <20090225204844.08a39c17@pws-pc> In-Reply-To: <20090225203949.5e203b85@pws-pc> References: <090221111624.ZM12907@torch.brasslantern.com> <090221165745.ZM13030@torch.brasslantern.com> <20090225203949.5e203b85@pws-pc> 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=NLZqzBF-AAAA:8 a=BcUNzw5hy-gNRh4NJiAA:9 a=5d_Gj-h34pxOQU6TYJh_M2ClbFAA:4 a=LY0hPdMaydYA: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 Wed, 25 Feb 2009 20:39:49 +0000 Peter Stephenson wrote: > 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. Scratch that, it's simpler---we never want two -s's, we just want to ensure $ISUFFIX is there when needed. This time I do have some evidence this is doing better things with GLOBCOMPLETE set than previously. 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:46:01 -0000 @@ -666,14 +666,13 @@ # We are inserting the match into the command line. if [[ "$tmp3" = */* ]]; then tmp4=( $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" - -s "${Uopt:+$ISUFFIX}" -W "$prepath$realpath$testpath" "$pfxsfx[@]" $Mopts ) if [[ -z "$listsfx" ]]; then for i in "$tmp1[@]"; do tmpdisp=("${i%%/*}") _list_files tmpdisp "$prepath$realpath$testpath" - compadd "$tmp4[@]" -s "/${i#*/}" $listopts - "$tmpdisp" + compadd "$tmp4[@]" -s "/${i#*/}${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp" done else [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*" -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/