From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2981 invoked from network); 26 Feb 2009 04:13:16 -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; 26 Feb 2009 04:13:16 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 61215 invoked from network); 26 Feb 2009 04:13:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Feb 2009 04:13:08 -0000 Received: (qmail 6646 invoked by alias); 26 Feb 2009 04:13:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26609 Received: (qmail 6630 invoked from network); 26 Feb 2009 04:13:01 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 26 Feb 2009 04:13:01 -0000 Received: from vms173011pub.verizon.net (vms173011pub.verizon.net [206.46.173.11]) by bifrost.dotsrc.org (Postfix) with ESMTP id 947D08058F83 for ; Thu, 26 Feb 2009 05:12:56 +0100 (CET) Received: from torch.brasslantern.com ([173.67.122.60]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KFN00IVMNP28TEZ@vms173011.mailsrvcs.net> for zsh-workers@sunsite.dk; Wed, 25 Feb 2009 22:12:43 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id n1Q4CbpE022081 for ; Wed, 25 Feb 2009 20:12:37 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id n1Q4CaA7022080 for zsh-workers@sunsite.dk; Wed, 25 Feb 2009 20:12:36 -0800 From: Bart Schaefer Message-id: <090225201236.ZM22079@torch.brasslantern.com> Date: Wed, 25 Feb 2009 20:12:36 -0800 In-reply-to: <090225173059.ZM21819@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: globcomplete desctroys file completion" (Feb 25, 5:30pm) References: <090221111624.ZM12907@torch.brasslantern.com> <090221165745.ZM13030@torch.brasslantern.com> <20090225203949.5e203b85@pws-pc> <20090225204844.08a39c17@pws-pc> <090225173059.ZM21819@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@sunsite.dk Subject: Re: globcomplete desctroys file completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.92.1/9048/Wed Feb 25 22:08:29 2009 on bifrost X-Virus-Status: Clean On Feb 25, 5:30pm, Bart Schaefer wrote: } } Take a look at this: } } schaefer<506> print T*/t*/t } schaefer<506> print Tmp/texlive/texmf-local/ } Completing default } texlive/ texlive/ texlive/ texlive2008/ } texlive/ texlive/ texlive2008/ texlive2008/ } texlive/ texlive/ texlive2008/ texlive2008/ } texlive/ texlive/ texlive2008/ texlive2008/ } } (menu-select highlight is on the first "texlive/"). If I left-arrow (That should have said "right-arrow") } through the menu, I get e.g. } } schaefer<506> print Tmp/texlive/texmf-config/ } } schaefer<506> print Tmp/texlive/texmf-var/ } } schaefer<506> print Tmp/texlive2008/texmf-dist/ } } This leads me to believe that really the second -s should have been } a -S (a suffix, not a hidden suffix) and the first -s in tmp4 was in } fact correct. No, that's not right either. At this point the following is the only thing I've tried that gets me the same behavior (including proper cursor placement) both with and without globcomplete set. This bothers me, because I don't understand why globcomplete sends us through this branch of the code in the first place. I mean, I follow the conditional logic in _path_files that gets it here, but I don't know why the conditionals are written the way they are. --- ../current/Completion/Unix/Type/_path_files 2009-02-25 17:03:56.000000000 -0800 +++ Completion/Unix/Type/_path_files 2009-02-25 20:03:30.000000000 -0800 @@ -670,9 +670,9 @@ "$pfxsfx[@]" $Mopts ) if [[ -z "$listsfx" ]]; then for i in "$tmp1[@]"; do - tmpdisp=("${i%%/*}") + tmpdisp=("$i") _list_files tmpdisp "$prepath$realpath$testpath" - compadd "$tmp4[@]" -s "/${i#*/}${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp" + compadd "$tmp4[@]" -s "${Uopt:+$ISUFFIX}" $listopts - "$tmpdisp" done else [[ -n "$compstate[pattern_match]" ]] && SUFFIX="${SUFFIX:s./.*/}*"