mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
A paver (Python build and configuration utility) plugin
This commit is contained in:
parent
26c7adf110
commit
4cc0a2638c
1 changed files with 16 additions and 0 deletions
16
plugins/paver/paver.plugin.zsh
Normal file
16
plugins/paver/paver.plugin.zsh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
_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
|
Loading…
Reference in a new issue