Add zsh/oh my zsh/w10k
This commit is contained in:
12
zsh/.oh-my-zsh/plugins/paver/README.md
Normal file
12
zsh/.oh-my-zsh/plugins/paver/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Paver
|
||||
|
||||
This plugin adds completion for the `paver` command-line tool of [Paver](https://pythonhosted.org/Paver/).
|
||||
|
||||
To use it, add `paver` to the plugins array of your zshrc file:
|
||||
```zsh
|
||||
plugins=(... paver)
|
||||
```
|
||||
|
||||
The completion function creates a cache of paver tasks with the name `.paver_tasks`,
|
||||
in the current working directory. It regenerates that cache when the `pavement.py`
|
||||
changes.
|
16
zsh/.oh-my-zsh/plugins/paver/paver.plugin.zsh
Normal file
16
zsh/.oh-my-zsh/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
|
Reference in New Issue
Block a user