From d794a5d67928aee15614dddac04053eb0dcb905d Mon Sep 17 00:00:00 2001 From: Claus Witt Date: Wed, 17 Nov 2010 11:17:03 +0100 Subject: [PATCH 1/2] Removed the echo statement - no need for that. --- plugins/phing/phing.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 80e3346..8f4adca 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -10,7 +10,6 @@ _phing_does_target_list_need_generating () { _phing () { if [ -f build.xml ]; then if _phing_does_target_list_need_generating; then - echo "\nGenerating .phing_targets..." > /dev/stderr phing -l |grep -v ":" |grep -v "^$"|grep -v "\-" > .phing_targets fi compadd `cat .phing_targets` From ea7bc1362cf5ffbe0bae0a71e72f3dd61779a4e0 Mon Sep 17 00:00:00 2001 From: Claus Witt Date: Thu, 25 Nov 2010 21:48:07 +0100 Subject: [PATCH 2/2] Added ant plugin --- plugins/ant/ant.plugin.zsh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/ant/ant.plugin.zsh diff --git a/plugins/ant/ant.plugin.zsh b/plugins/ant/ant.plugin.zsh new file mode 100644 index 0000000..0544ac9 --- /dev/null +++ b/plugins/ant/ant.plugin.zsh @@ -0,0 +1,19 @@ +_ant_does_target_list_need_generating () { + if [ ! -f .ant_targets ]; then return 0; + else + accurate=$(stat -f%m .ant_targets) + changed=$(stat -f%m build.xml) + return $(expr $accurate '>=' $changed) + fi +} + +_ant () { + if [ -f build.xml ]; then + if _ant_does_target_list_need_generating; then + sed -n '/ .ant_targets + fi + compadd `cat .ant_targets` + fi +} + +compdef _ant ant