Skip to content

Instantly share code, notes, and snippets.

@kennyp
Created July 3, 2014 15:49
Show Gist options
  • Save kennyp/2a0d555f7a44c1ae438f to your computer and use it in GitHub Desktop.
Save kennyp/2a0d555f7a44c1ae438f to your computer and use it in GitHub Desktop.
Make love for bashrc.
_make () {
local curw=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=()
COMPREPLY=($(compgen -W "$(make -qp | grep : | grep '^[a-z]' | cut -d: -f1)" -- $curw))
return 0
}
complete -F _make make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment