diff options
author | NanoTech <nanotech008@gmail.com> | 2011-02-05 23:51:05 -0600 |
---|---|---|
committer | NanoTech <nanotech008@gmail.com> | 2011-02-05 23:51:05 -0600 |
commit | 143dd165e973a3559fbc1b085f1ff05e263f85b0 (patch) | |
tree | 25aa67cf40f468d658ec6f37657e8efa3c128ef8 /plugins/phing/phing.plugin.zsh | |
parent | 2a203b558fd6328c9a91e9dbbf145d91e7ba7ed1 (diff) | |
parent | 01b0366f3e27cf30f3882870100f14625fc267d1 (diff) | |
download | zsh-143dd165e973a3559fbc1b085f1ff05e263f85b0.tar.gz zsh-143dd165e973a3559fbc1b085f1ff05e263f85b0.tar.bz2 zsh-143dd165e973a3559fbc1b085f1ff05e263f85b0.zip |
Merge branch 'master' of git://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 |