From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28757 invoked from network); 29 Jan 2009 17:51:46 -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.3 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; 29 Jan 2009 17:51:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 70498 invoked from network); 29 Jan 2009 17:51:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Jan 2009 17:51:41 -0000 Received: (qmail 12709 invoked by alias); 29 Jan 2009 17:51:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26485 Received: (qmail 12700 invoked from network); 29 Jan 2009 17:51:34 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Jan 2009 17:51:34 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [208.87.233.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 2CAA080271F0 for ; Thu, 29 Jan 2009 18:51:29 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly27g.srv.mailcontrol.com (MailControl) with ESMTP id n0THpQuN002895 for ; Thu, 29 Jan 2009 17:51:26 GMT Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Thu, 29 Jan 2009 17:51:25 +0000 Date: Thu, 29 Jan 2009 17:51:25 +0000 From: Peter Stephenson To: Zsh list Subject: Re: bug in accept-exact-dirs style Message-ID: <20090129175125.4fd49a32@news01> In-Reply-To: <090129082025.ZM15909@torch.brasslantern.com> References: <18815.40644.128711.97121@gargle.gargle.HOWL> <090129082025.ZM15909@torch.brasslantern.com> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jan 2009 17:51:25.0942 (UTC) FILETIME=[34A08960:01C9823A] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.71.0.137 X-Virus-Scanned: ClamAV 0.92.1/8919/Thu Jan 29 14:05:38 2009 on bifrost X-Virus-Status: Clean On Thu, 29 Jan 2009 08:20:25 -0800 Bart Schaefer wrote: > On Jan 27, 6:54pm, Greg Klanderman wrote: > } > } [~] greg@lwm| zsh -f > } lwm% mkdir foo > } lwm% touch foo/bar > } lwm% touch foo/baz > } lwm% autoload -U compinit > } lwm% compinit > } lwm% zstyle ':completion:*' accept-exact-dirs yes > } > } Now try completing each of the following: > } > } ls foo/ # OK > } ls ~/foo/ # doesn't work - no completions > } ls /home/greg/foo/ # OK > } ls $HOME/foo/ # doesn't work - no completions > > Then the code is fooled into thinking that the suffix is part of the > prefix, and on line 585 the PREFIX string is rebuilt in the wrong order, > becoming "tmp/~/" instead of "~/tmp/". Ah, yes, The bug is at this point, I think. The ordering appears to be OK for other uses of donepath (though, in _path_files, it's hard to be sure). Thanks for looking. Index: Completion/Unix/Type/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v retrieving revision 1.41 diff -u -r1.41 _path_files --- Completion/Unix/Type/_path_files 10 Nov 2008 15:28:41 -0000 1.41 +++ Completion/Unix/Type/_path_files 29 Jan 2009 17:49:41 -0000 @@ -578,11 +578,11 @@ if [[ "$tpre" = */* ]]; then tmp2="${cpre}${tpre%%/*}" - PREFIX="${donepath}${linepath}${tmp2}" + PREFIX="${linepath}${donepath}${tmp2}" SUFFIX="/${tpre#*/}${tsuf#*/}" else tmp2="${cpre}${tpre}" - PREFIX="${donepath}${linepath}${tmp2}" + PREFIX="${linepath}${donepath}${tmp2}" SUFFIX="${tsuf}" fi -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070