<div class="gmail_quote">On Sat, Mar 26, 2011 at 18:01, Raph <span dir="ltr">&lt;<a href="mailto:gibboris@gmail.com">gibboris@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sat, Mar 26, 2011 at 03:51:32PM +0200, Elan Ruusamäe wrote:<br>
&gt; hi please review phing completion:<br>
&gt;<br>
&gt; <a href="https://alioth.debian.org/tracker/?func=detail&amp;atid=413095&amp;aid=312910&amp;group_id=100114" target="_blank">https://alioth.debian.org/tracker/?func=detail&amp;atid=413095&amp;aid=312910&amp;group_id=100114</a><br>

&gt;<br>
<br>
</div>I didn&#39;t test it but it seems quite nice to me.<br>
But I don&#39;t understand the sed trickery (and my GNU sed 4.2.1 does not<br>
complains)<br>
<br>
I don&#39;t remember the bash completion policies about the GNU sed<br>
extensions but, if allowed, wouldn&#39;t the following be ok ?<br>
$ sed -nE &quot;/&lt;target /s/.*name=[\&quot;&#39;](\w+)[\&quot;&#39;].*/\1/p&quot; $buildfile<br>
otherwise<br>
$ sed -ne &quot;/&lt;target /s/.*name=[\&quot;&#39;]\([a-zA-Z0-9]\+\)[\&quot;&#39;].*/\1/p&quot; $buildfile<br></blockquote><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>that target name extraction is identical to completions/ant,</div>
<div>and ant is in git, so should be fine for phing too:</div></div><div><br></div><div>sed -ne &#39;s/.*&lt;target .*name=&quot;\([^&quot;]*\).*/\1/p&#39;</div><div><br></div><div>here&#39;s no trickery, imho pretty standard &quot;take-anything-between-double-quotes-and-print-it&quot; pattern</div>
<div><br></div><div>-- </div><div>glen</div></div>