From f518a387a8d7a1178b38943ffffe70b40dfc98ce Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 29 Nov 2007 09:49:42 +0000 Subject: Kohsuke Kawaguchi: 24129: when completing ant targets, skip those beginning - that cant be invoked from the command line --- Completion/Unix/Command/_ant | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_ant b/Completion/Unix/Command/_ant index 7e7d14c2a..90f2f5699 100644 --- a/Completion/Unix/Command/_ant +++ b/Completion/Unix/Command/_ant @@ -8,7 +8,9 @@ local buildfile classpath cp userjars importedfiles target='*:target:->target' t find_targets() { importedfiles=( $(sed -n "s/ *]* file=[\"']\([^\"']*\)[\"'].*/\1/p" < $1) ) - sed -n "s/ *]* name=[\"']\([^\"']*\)[\"'].*/\1/p" $1 + # Tweaked to omit targets beginning with "-" that can't + # be invoked from the command line; see zsh-workers/24129. + sed -n "s/ *]* name=[\"']\([^-][^\"']*\)[\"'].*/\1/p" $1 if (( $#importedfiles )) ; then ( cd $1:h for file in $importedfiles ; do -- cgit 1.4.1