From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28860 invoked from network); 29 Oct 2008 21:56:29 -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; 29 Oct 2008 21:56:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 16300 invoked from network); 29 Oct 2008 21:56:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Oct 2008 21:56:17 -0000 Received: (qmail 7291 invoked by alias); 29 Oct 2008 21:56:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25945 Received: (qmail 7276 invoked from network); 29 Oct 2008 21:56:09 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Oct 2008 21:56:09 -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 ED3A880524C0 for ; Wed, 29 Oct 2008 22:56:05 +0100 (CET) Received: from aamtaout03-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 <20081029215605.RLKS13155.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Wed, 29 Oct 2008 21:56:05 +0000 Received: from pws-pc ([81.107.43.40]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081029215605.CWIF2093.aamtaout03-winn.ispmail.ntl.com@pws-pc> for ; Wed, 29 Oct 2008 21:56:05 +0000 Date: Wed, 29 Oct 2008 22:55:55 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: zsh 4.3.8 regression: buggy completion Message-ID: <20081029225555.5b614101@pws-pc> In-Reply-To: <20081029191014.GR27605@prunille.vinc17.org> References: <20081029191014.GR27605@prunille.vinc17.org> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; 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=Ppaa5kTMzAIA:10 a=NLZqzBF-AAAA:8 a=gWZhMw6rBAoeSJigSEwA:9 a=NED1PWdEMhJnPWZI680A:7 a=BTqdX69pfpeyxDag6Kf0_oCYFYkA:4 a=i3cdq6PjXusA:10 a=_dQi-Dcv4p4A:10 a=LY0hPdMaydYA:10 X-Virus-Scanned: ClamAV 0.92.1/8538/Wed Oct 29 19:45:41 2008 on bifrost X-Virus-Status: Clean On Wed, 29 Oct 2008 20:10:14 +0100 Vincent Lefevre wrote: > With zsh 4.3.8, I can no longer complete using the the first > characters of each directory, e.g. "cd /u/lo/li[TAB]" for > /usr/local/lib. AFAIK, the pre-release didn't have this problem. Thanks for noticing. I can get this with zsh -f plus compinit, but for some reason not with my usual options. (Hence my comment about the pinball rolling down _path_files different ways.) Comparing with previous versions shows there's a matcher option missing from compadd when -U is not also present. (We shouldn't have had to remove the matcher when -U is present, it just prevented me having to fix the internal completion code.) Please confirm this fixes it and I'll make 4.3.9. Index: Completion/Unix/Type/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v retrieving revision 1.38 diff -u -r1.38 _path_files --- Completion/Unix/Type/_path_files 28 Oct 2008 22:23:05 -0000 1.38 +++ Completion/Unix/Type/_path_files 29 Oct 2008 21:51:33 -0000 @@ -9,7 +9,7 @@ local nm=$compstate[nmatches] menu matcher mopts sort mid accex fake local listfiles listopts tmpdisp origtmp1 Uopt integer npathcheck -local -a match mbegin mend +local -a match mbegin mend Mopts typeset -U prepaths exppaths @@ -209,7 +209,12 @@ [[ $compstate[insert] = (*menu|[0-9]*) || -n "$_comp_correct" || ( -n "$compstate[pattern_match]" && "${orig#\~}" != (|*[^\\])[][*?#~^\|\<\>]* ) ]] && menu=yes -[[ -n "$_comp_correct" ]] && cfopt=- Uopt=-U +if [[ -n "$_comp_correct" ]]; then + cfopt=- + Uopt=-U +else + Mopts=(-M "r:|/=* r:|=*") +fi # Now let's have a closer look at the string to complete. @@ -616,7 +621,7 @@ -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ -s "/${tmp3#*/}${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ + "$pfxsfx[@]" $Mopts \ $listopts \ -a tmp1 else @@ -627,7 +632,7 @@ -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ + "$pfxsfx[@]" $Mopts \ $listopts \ -a tmp1 fi @@ -636,7 +641,7 @@ compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ + "$pfxsfx[@]" $Mopts \ $listopts \ -a tmp1 fi @@ -646,7 +651,7 @@ tmp4=( $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" -s "${Uopt:+$ISUFFIX}" -W "$prepath$realpath$testpath" - "$pfxsfx[@]" ) + "$pfxsfx[@]" $Mopts ) if [[ -z "$listsfx" ]]; then for i in "$tmp1[@]"; do tmpdisp=("${i%%/*}") @@ -666,7 +671,7 @@ compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" \ + "$pfxsfx[@]" $Mopts \ $listopts \ -a tmp1 fi @@ -735,7 +740,7 @@ compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp3/" \ -s "/$tmp4$i${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath${mid%/*/}/" \ - "$pfxsfx[@]" $listopts - "$tmp2" + "$pfxsfx[@]" $Mopts $listopts - "$tmp2" done else if [[ "$osuf" = */* ]]; then @@ -766,7 +771,7 @@ compadd $Uopt -Qf -p "${Uopt:+$IPREFIX}$linepath$tmp4" \ -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ - "$pfxsfx[@]" "$mopts[@]" $listopts -a tmp1 + "$pfxsfx[@]" "$mopts[@]" $Mopts $listopts -a tmp1 fi fi fi -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/