Skip to content

Instantly share code, notes, and snippets.

@gardiner
Created March 5, 2013 09:20
Show Gist options
  • Save gardiner/5089016 to your computer and use it in GitHub Desktop.
Save gardiner/5089016 to your computer and use it in GitHub Desktop.
export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/}
_check_rakefile() {
tasks=$(rake -T 2>/dev/null | cut -d " " -f 2) || return
COMPREPLY=($(compgen -W "$tasks" -- ${COMP_WORDS[COMP_CWORD]}))
}
complete -F _check_rakefile -o default rake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment