54e475844a002a8c2f0793b205c300feb516c24a
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #139 from clauswitt/master
Fixed an issue with the phing plugin
Diff
1diff --git a/plugins/ant/ant.plugin.zsh b/plugins/ant/ant.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..0544ac92cb18ccfee2fc204b4050cbd1b93923da
4--- /dev/null
5+++ b/plugins/ant/ant.plugin.zsh
6@@ -0,0 +1,19 @@
7+_ant_does_target_list_need_generating () {
8+ if [ ! -f .ant_targets ]; then return 0;
9+ else
10+ accurate=$(stat -f%m .ant_targets)
11+ changed=$(stat -f%m build.xml)
12+ return $(expr $accurate '>=' $changed)
13+ fi
14+}
15+
16+_ant () {
17+ if [ -f build.xml ]; then
18+ if _ant_does_target_list_need_generating; then
19+ sed -n '/<target/s/<target.*name="\([^"]*\).*$/\1/p' build.xml > .ant_targets
20+ fi
21+ compadd `cat .ant_targets`
22+ fi
23+}
24+
25+compdef _ant ant
26diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh
27index 80e33462952f42d6533b09583b5dfb00fefda1c0..8f4adca08720ffdffc8ca258637d399dcdef8e37 100644
28--- a/plugins/phing/phing.plugin.zsh
29+++ b/plugins/phing/phing.plugin.zsh
30@@ -10,7 +10,6 @@ _phing_does_target_list_need_generating () {
31 _phing () {
32 if [ -f build.xml ]; then
33 if _phing_does_target_list_need_generating; then
34- echo "\nGenerating .phing_targets..." > /dev/stderr
35 phing -l |grep -v ":" |grep -v "^$"|grep -v "\-" > .phing_targets
36 fi
37 compadd `cat .phing_targets`