paver.plugin.zsh 411 B

12345678910111213141516
  1. _paver_does_target_list_need_generating () {
  2. [ ! -f .paver_targets ] && return 0
  3. [ pavement.py -nt .paver_targets ] && return 0
  4. return 1
  5. }
  6. _paver () {
  7. if [ -f pavement.py ]; then
  8. if _paver_does_target_list_need_generating; then
  9. paver --help 2>&1 |grep '-'|grep -v -e '--'|awk -F '-' '{print $1}'|tr -d ' ' > .paver_targets
  10. fi
  11. compadd `cat .paver_targets`
  12. fi
  13. }
  14. compdef _paver paver