]> git.rmz.io Git - dotfiles.git/blob - zsh/plugins/phing/phing.plugin.zsh
enable extract plugin
[dotfiles.git] / zsh / plugins / phing / phing.plugin.zsh
1 _phing_does_target_list_need_generating () {
2 if [ ! -f .phing_targets ]; then return 0;
3 else
4 accurate=$(stat -f%m .phing_targets)
5 changed=$(stat -f%m build.xml)
6 return $(expr $accurate '>=' $changed)
7 fi
8 }
9
10 _phing () {
11 if [ -f build.xml ]; then
12 if _phing_does_target_list_need_generating; then
13 phing -l |grep -v ":" |grep -v "^$"|grep -v "\-" > .phing_targets
14 fi
15 compadd `cat .phing_targets`
16 fi
17 }
18
19 compdef _phing phing