phing.plugin.zsh 438 Bytes
Newer Older
Claus Witt's avatar
Claus Witt committed
1
_phing_does_target_list_need_generating () {
2
3
4
  [ ! -f .phing_targets ] && return 0;
  [ .phing_targets -nt build.xml ] && return 0;
  return 1;
Claus Witt's avatar
Claus Witt committed
5
6
7
8
9
}

_phing () {
  if [ -f build.xml ]; then
    if _phing_does_target_list_need_generating; then
10
      phing -l|grep -v "\[property\]"|grep -v "Buildfile"|sed 1d|grep -v ":$" |grep -v "^\-*$"|awk '{print $1}' > .phing_targets
Claus Witt's avatar
Claus Witt committed
11
12
13
14
15
16
    fi
    compadd `cat .phing_targets`
  fi
}

compdef _phing phing