From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10602 invoked from network); 23 Oct 2008 02:32:00 -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.4 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; 23 Oct 2008 02:32:00 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 20133 invoked from network); 23 Oct 2008 02:31:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Oct 2008 02:31:52 -0000 Received: (qmail 13575 invoked by alias); 23 Oct 2008 02:31:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25927 Received: (qmail 13558 invoked from network); 23 Oct 2008 02:31:43 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 23 Oct 2008 02:31:43 -0000 Received: from vms172071pub.verizon.net (vms172071pub.verizon.net [206.46.172.71]) by bifrost.dotsrc.org (Postfix) with ESMTP id 54F9680524C0 for ; Thu, 23 Oct 2008 04:31:39 +0200 (CEST) Received: from torch.brasslantern.com ([96.238.220.215]) by vms172071.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K96007PR70L8HP0@vms172071.mailsrvcs.net> for zsh-workers@sunsite.dk; Wed, 22 Oct 2008 21:31:34 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id m9N2VWR1026738 for ; Wed, 22 Oct 2008 19:31:33 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m9N2VWXI026737 for zsh-workers@sunsite.dk; Wed, 22 Oct 2008 19:31:32 -0700 Date: Wed, 22 Oct 2008 19:31:32 -0700 From: Bart Schaefer Subject: Re: ./configure completer broken? In-reply-to: <237967ef0810221051k615256f5l64d1c4941073ba5c@mail.gmail.com> To: zsh-workers Message-id: <081022193132.ZM26736@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <237967ef0810221051k615256f5l64d1c4941073ba5c@mail.gmail.com> Comments: In reply to "Mikael Magnusson" "./configure completer broken?" (Oct 22, 7:51pm) X-Virus-Scanned: ClamAV 0.92.1/8470/Wed Oct 22 17:13:42 2008 on bifrost X-Virus-Status: Clean On Oct 22, 7:51pm, Mikael Magnusson wrote: } Subject: ./configure completer broken? } } not sure what's going on here, with zsh -f with compinit i get } ./configure --prefi } ./configure --prefix= } ./configure --prefix=--prefix= I can reproduce this. More fun with "compadd -U". Thanks for catching it before the .7 release. --- ../zsh-forge/current/Completion/Unix/Type/_path_files 2008-10-14 22:56:31.000000000 -0700 +++ Completion/Unix/Type/_path_files 2008-10-22 19:28:43.000000000 -0700 @@ -612,8 +612,9 @@ # back up the path. tmp1=("${(@)tmp1%%/*}") _list_files tmp1 "$prepath$realpath$testpath" - compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ - -s "/${tmp3#*/}$ISUFFIX" \ + compadd $Uopt -Qf "$mopts[@]" \ + -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ + -s "/${tmp3#*/}${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ $listopts \ @@ -622,8 +623,9 @@ # Same with a non-empty suffix tmp1=("${(@)^tmp1%%/*}/${tmp3#*/}") _list_files tmp1 "$prepath$realpath$testpath" - compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ - -s "$ISUFFIX" \ + compadd $Uopt -Qf "$mopts[@]" \ + -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ + -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ $listopts \ @@ -631,8 +633,8 @@ fi else _list_files tmp1 "$prepath$realpath$testpath" - compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ - -s "$ISUFFIX" \ + compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ + -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ $listopts \ @@ -641,8 +643,8 @@ else # We are inserting the match into the command line. if [[ "$tmp3" = */* ]]; then - tmp4=( -U -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" - -s "$ISUFFIX" + tmp4=( $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" + -s "${Uopt:+$ISUFFIX}" -W "$prepath$realpath$testpath" "$pfxsfx[@]" ) if [[ -z "$listsfx" ]]; then @@ -661,8 +663,8 @@ fi else _list_files tmp1 "$prepath$realpath$testpath" - compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ - -s "$ISUFFIX" \ + compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+$IPREFIX}$linepath$tmp2" \ + -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ $listopts \ @@ -730,8 +732,8 @@ compquote tmp4 tmp2 tmp1 for i in "$tmp1[@]"; do _list_files tmp2 "$prepath$realpath${mid%/*/}" - compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp3/" \ - -s "/$tmp4$i$ISUFFIX" \ + compadd $Uopt -Qf "$mopts[@]" -p "${Uopt:+IPREFIX}$linepath$tmp3/" \ + -s "/$tmp4$i${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath${mid%/*/}/" \ "$pfxsfx[@]" $listopts - "$tmp2" done @@ -761,8 +763,8 @@ else # Not a pattern match _list_files tmp1 "$prepath$realpath$testpath" - compadd $Uopt -Qf -p "$IPREFIX$linepath$tmp4" \ - -s "$ISUFFIX" \ + compadd $Uopt -Qf -p "${Uopt:+IPREFIX}$linepath$tmp4" \ + -s "${Uopt:+$ISUFFIX}" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" "$mopts[@]" $listopts -a tmp1 fi