zsh-workers
 help / color / mirror / code / Atom feed
* ./configure completer broken?
@ 2008-10-22 17:51 Mikael Magnusson
  2008-10-23  2:31 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2008-10-22 17:51 UTC (permalink / raw)
  To: zsh-workers

not sure what's going on here, with zsh -f with compinit i get
./configure --prefi<tab>
./configure --prefix=<tab>
./configure --prefix=--prefix=<tab>

and with my normal .zshrc i get this error message at the last tab,
---- no match for: `prefix directory', `option', or `corrections'

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ./configure completer broken?
  2008-10-22 17:51 ./configure completer broken? Mikael Magnusson
@ 2008-10-23  2:31 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2008-10-23  2:31 UTC (permalink / raw)
  To: zsh-workers

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<tab>
} ./configure --prefix=<tab>
} ./configure --prefix=--prefix=<tab>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-23  2:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22 17:51 ./configure completer broken? Mikael Magnusson
2008-10-23  2:31 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).