Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Completion/Unix/_ant does not handle apostrophes



Dear workers,

I noticed  that Unix/_ant does  not complete on targets  enclosed within
apostrophes, only quotation  marks.  This patch addresses  the issue, as
XML allows both for an attribute value.

Best regards,
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/
--- _ant.orig	Tue May 25 18:12:22 2004
+++ _ant	Fri Jul 16 11:43:36 2004
@@ -86,7 +86,7 @@
 	buildfile=${(v)opt_args[(I)(-f|-file|-buildfile)]:-build.xml}
       fi
       if [[ -f $buildfile ]]; then
-	targets=( $(sed -n 's/ *<target name="\([^"]*\)".*/\1/p' < $buildfile) )
+	targets=( $(sed -n 's/ *<target name=["'"'"']\([^"'"'"']*\)["'"'"'].*/\1/p' < $buildfile) )
 	_wanted targets expl target compadd -a targets && ret=0
       else
 	_message -e targets target


Messages sorted by: Reverse Date, Date, Thread, Author