Home | Articles | CV (pdf)
<2014-09-14> by Lorenzo Bolla

Autocomplete paver with zsh

Here is a quick way to have autocompletion of paver tasks on zsh. Just add these lines to your .zshrc file:

_paver_tasks () {
    reply=( $(paver help | awk '/^  ([a-zA-Z_]+).+-/{print $1}') )
}
compctl -K _paver_tasks paver

Then, at a zsh prompt, if in a directory containing a pavement.py file, hitting paver <TAB> will list the available tasks.

Enjoy!