This repository has been archived on 2024-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles-old/dot_oh-my-zsh/plugins/paver/paver.plugin.zsh

17 lines
411 B
Bash
Raw Normal View History

_paver_does_target_list_need_generating () {
[ ! -f .paver_targets ] && return 0
[ pavement.py -nt .paver_targets ] && return 0
return 1
}
_paver () {
if [ -f pavement.py ]; then
if _paver_does_target_list_need_generating; then
paver --help 2>&1 |grep '-'|grep -v -e '--'|awk -F '-' '{print $1}'|tr -d ' ' > .paver_targets
fi
compadd `cat .paver_targets`
fi
}
compdef _paver paver