From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16458 invoked by alias); 8 May 2011 18:16:54 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29189 Received: (qmail 26007 invoked from network); 8 May 2011 18:16:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.58 as permitted sender) Date: Sun, 8 May 2011 18:37:11 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Patch (?) for _path_files Message-ID: <20110508183711.01106e3e@pws-pc.ntlworld.com> In-Reply-To: <110506080555.ZM21390@torch.brasslantern.com> References: <110506080555.ZM21390@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; 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.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=Bw7ULztoXjLtdCP6-kgA:9 a=wU1irgBzx2Zo8zIqD9gA:7 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Fri, 06 May 2011 08:05:55 -0700 Bart Schaefer wrote: > I believe this has to do with the thread "Re: Another _path_files bug?" > from the first couple of weeks of February 2011. > > --- ../zsh-forge/current/Completion/Unix/Type/_path_files 2011-02-13 10:44 > :16 -0800 > +++ ./Completion/Unix/Type/_path_files 2011-02-13 10:51:33 -0800 > @@ -751,10 +751,11 @@ > [[ "$tsuf" != /* ]] && mid="$testpath" > if [[ -z "$_comp_correct" && -n "$compstate[pattern_match]" && > "$tmp2" = (|*[^\\])[][*?#~^\|\<\>]* ]]; then > - cpre="${cpre}${tmp1[1]%%/*}/" > + cpre="${cpre}${tmp1[1]%%/*}" > else > - cpre="${cpre}${tpre}/" > + cpre="${cpre}${tpre}" > fi > + [[ "$tsuf" = /* ]] && cpre+=/ > tpre="${tsuf#*/}" > tsuf= > else > > I backed out most of my scratch work from that thread when PWS posted > workers/28750, but kept this bit -- for reasons that sadly I now no > longer remember. It avoids appending a slash to the common prefix (if > I recall correctly what cpre means, which I may not) unless there was > a leading slash on the tested suffix (again IIRC tsuf). I suspect > this was meant to prevent double slash appearing in some completions. > > Any opinions on whether this is correct/useful? Unless we find it out case it affects, I don't think we can tell. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/