Skip to content
indeyets edited this page Mar 15, 2011 · 13 revisions

Run default task:

pake

Run “cleanup” task:

pake cleanup

Get list of tasks:

pake --tasks

Get more help:

pake --help

Task name autocompletion for bash

Add this to ~/.bashrc:

_pake_complete() {
  COMPREPLY=( $( compgen -W "$( pake -T < /dev/null | grep ' > ' | awk '{ print $1 }' )" -- `_get_cword` ) )
  return 0
}
complete -F _pake_complete pake

On some systems this snippet could be saved as /etc/bash_completion.d/pake to become available system wide.

On OS X, you might need an auxiliary bash function, this case named similarly:

_get_cword() {
  return $COMP_CWORD
}
_pake_complete() {
  COMPREPLY=( $( compgen -W "$( pake -T < /dev/null | grep ' > ' | awk '{ print $1 }' )" -- `_get_cword` ) )
  return 0
}
complete -F _pake_complete pake

Task name autocompletion for zsh

Add this to ~/.zshrc:

_pake_complete() {
    local a
    read -l a
    reply=(`pake -P|grep "$a"|cut -d " " -f2|sort|tr '\n' ' '`)
}
compctl -K _pake_complete pake
Clone this wiki locally