1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00
ohmyzsh/plugins/paver/paver.plugin.zsh

16 lines
414 B
Bash

_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