phing.plugin.zsh 438 B

12345678910111213141516
  1. _phing_does_target_list_need_generating () {
  2. [ ! -f .phing_targets ] && return 0;
  3. [ build.xml -nt .phing_targets ] && return 0;
  4. return 1;
  5. }
  6. _phing () {
  7. if [ -f build.xml ]; then
  8. if _phing_does_target_list_need_generating; then
  9. phing -l|grep -v "\[property\]"|grep -v "Buildfile"|sed 1d|grep -v ":$" |grep -v "^\-*$"|awk '{print $1}' > .phing_targets
  10. fi
  11. compadd `cat .phing_targets`
  12. fi
  13. }
  14. compdef _phing phing