You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2014/12/24 13:32:40 UTC

ant git commit: enhance complete-ant-cmd.pl to know about -file and $ANT_ARGS Bugzilla Report 57371 Submitted by Christian Schmidt

Repository: ant
Updated Branches:
  refs/heads/master f1930b006 -> a3125e6e7


enhance complete-ant-cmd.pl to know about -file and $ANT_ARGS
Bugzilla Report 57371
Submitted by Christian Schmidt


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/a3125e6e
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/a3125e6e
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/a3125e6e

Branch: refs/heads/master
Commit: a3125e6e7837395ba6674d57f5f677f07bccda76
Parents: f1930b0
Author: Stefan Bodewig <bo...@apache.org>
Authored: Wed Dec 24 13:31:29 2014 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Wed Dec 24 13:31:29 2014 +0100

----------------------------------------------------------------------
 CONTRIBUTORS                   | 1 +
 WHATSNEW                       | 7 +++++++
 contributors.xml               | 4 ++++
 src/script/complete-ant-cmd.pl | 8 ++++----
 4 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/a3125e6e/CONTRIBUTORS
----------------------------------------------------------------------
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index de19a80..d83a683 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -53,6 +53,7 @@ Charles Hudak
 Charlie Hubbard
 Chris Povirk
 Christian Knorr
+Christian Schmidt
 Christoph Gysin
 Christoph Wilhelms
 Christophe Labouisse

http://git-wip-us.apache.org/repos/asf/ant/blob/a3125e6e/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 79670f3..e6a0b1b 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -52,6 +52,9 @@ Fixed bugs:
  * <junitreport> now supports nested <classpath> and <factory> elements.
    Bugzilla Report 47002
 
+ * complete-ant-cmd.pl now also knows about the -file option.
+   Bugzilla Report 57371
+
 Other changes:
 --------------
 
@@ -59,6 +62,10 @@ Other changes:
    when using the timestamped authority.
    Bugzilla Report 56678
 
+ * complete-ant-cmd.pl now also analyzes the ANT_ARGS environment
+   variable.
+   Bugzilla Report 57371
+
 Changes from Ant 1.9.3 TO Ant 1.9.4
 ===================================
 

http://git-wip-us.apache.org/repos/asf/ant/blob/a3125e6e/contributors.xml
----------------------------------------------------------------------
diff --git a/contributors.xml b/contributors.xml
index be1a4ca..3ce31a5 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -234,6 +234,10 @@
     <last>Knorr</last>
   </name>
   <name>
+    <first>Christian</first>
+    <last>Schmidt</last>
+  </name>
+  <name>
     <first>Christoph</first>
     <last>Gysin</last>
   </name>

http://git-wip-us.apache.org/repos/asf/ant/blob/a3125e6e/src/script/complete-ant-cmd.pl
----------------------------------------------------------------------
diff --git a/src/script/complete-ant-cmd.pl b/src/script/complete-ant-cmd.pl
index 8091921..4dd51a7 100644
--- a/src/script/complete-ant-cmd.pl
+++ b/src/script/complete-ant-cmd.pl
@@ -31,14 +31,14 @@
 #     }
 #     compctl -K ant_complete ant build.sh
 
-my $cmdLine = $ENV{'COMP_LINE'};
+my $cmdLine = "$ENV{'ANT_ARGS'} $ENV{'COMP_LINE'}";
 my $antCmd = $ARGV[0];
 my $word = $ARGV[1];
 
 my @completions;
 if ($word =~ /^-/) {
     list( restrict( $word, getArguments() ));
-} elsif ($cmdLine =~ /-(f|buildfile)\s+\S*$/) {
+} elsif ($cmdLine =~ /-(f|file|buildfile)\s+\S*$/) {
     list( getBuildFiles($word) );
 } else {
     list( restrict( $word, getTargets() ));
@@ -58,7 +58,7 @@ sub restrict {
 }
 
 sub getArguments {
-    qw(-buildfile -debug -emacs -f -find -help -listener -logfile 
+    qw(-buildfile -debug -emacs -f -file -find -help -listener -logfile 
        -logger -projecthelp -quiet -verbose -version); 
 }
 
@@ -72,7 +72,7 @@ sub getTargets {
 
     # Look for build-file
     my $buildFile = 'build.xml';
-    if ($cmdLine =~ /-(f|buildfile)\s+(\S+)/) {
+    if ($cmdLine =~ /-(f|file|buildfile)\s+(\S+)(?!.*\s-(f|file|buildfile)\s)/) {
         $buildFile = $2;
     }
     return () unless (-f $buildFile);