ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Williams <mwilli...@agentissoftware.com>
Subject [PATCH] complete-ant-cmd.pl - rename cache-file
Date Sun, 12 May 2002 22:53:18 GMT
This patch alters "complete-ant-cmd.pl" to use a cache-file that is
CVS-ignored by default.  Also fixes the doc to reflect the new script-name.

--- complete-ant-cmd.pl	10 Jan 2002 14:18:42 -0000	1.2
+++ complete-ant-cmd.pl	12 May 2002 22:49:00 -0000
@@ -7,7 +7,7 @@
 #
 # To install for Bash 2.0 or better, add the following to ~/.bashrc:
 # 
-#     $ complete -C complete-ant-cmd ant build.sh
+#     $ complete -C complete-ant-cmd.pl ant build.sh
 #
 # To install for Z-Shell 2.5 or better, add the following to ~/.zshrc:
 #
@@ -15,7 +15,7 @@
 #         local args_line args
 #         read -l args_line
 #         set -A args $args_line
-#         set -A reply $(COMP_LINE=$args_line complete-ant-cmd ${args[1]} $1)
+#         set -A reply $(COMP_LINE=$args_line complete-ant-cmd.pl ${args[1]} $1)
 #     }
 #     compctl -K ant_complete ant build.sh
 #     
@@ -70,7 +70,7 @@
     # Run "ant -projecthelp" to list targets.  Keep a cache of results in a
     # cache-file.
     my $cacheFile = $buildFile;
-    $cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|;
+    $cacheFile =~ s|([^/]+)$|\#${1}-targets\#|;
     if ((!-e $cacheFile) || (-M $buildFile) < (-M $cacheFile)) {
         open( CACHE, '>'.$cacheFile ) || die "can\'t write $cacheFile: $!\n";
         open( HELP, "$antCmd -projecthelp -f '$buildFile'|" ) || return(); 

-- 
cheers,
MikeW



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message