diff options
| author | Roman Kamyk <roman.kamyk@gmail.com> | 2011-02-05 11:48:46 +0100 | 
|---|---|---|
| committer | Roman Kamyk <roman.kamyk@gmail.com> | 2011-02-05 11:48:46 +0100 | 
| commit | 3e260a9ef63ed8e73650c72049002e6f9edd0dc9 (patch) | |
| tree | ff50ccfcc118375e11b5537bf08c9b8ad8edfe53 /plugins/phing/phing.plugin.zsh | |
| parent | 57e0b57434eb7f3b7d0fe0ca4849478477404e43 (diff) | |
| parent | 01b0366f3e27cf30f3882870100f14625fc267d1 (diff) | |
| download | zsh-3e260a9ef63ed8e73650c72049002e6f9edd0dc9.tar.gz zsh-3e260a9ef63ed8e73650c72049002e6f9edd0dc9.tar.bz2 zsh-3e260a9ef63ed8e73650c72049002e6f9edd0dc9.zip  | |
Merge branch 'master' of http://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/phing/phing.plugin.zsh')
| -rw-r--r-- | plugins/phing/phing.plugin.zsh | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh new file mode 100644 index 000000000..80e334629 --- /dev/null +++ b/plugins/phing/phing.plugin.zsh @@ -0,0 +1,20 @@ +_phing_does_target_list_need_generating () { +  if [ ! -f .phing_targets ]; then return 0; +  else +    accurate=$(stat -f%m .phing_targets) +    changed=$(stat -f%m build.xml) +    return $(expr $accurate '>=' $changed) +  fi +} + +_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` +  fi +} + +compdef _phing phing  | 
