Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ahmed-bhs/6a4ad11acc2dc9d0679f818181364192 to your computer and use it in GitHub Desktop.
Save ahmed-bhs/6a4ad11acc2dc9d0679f818181364192 to your computer and use it in GitHub Desktop.
Autocomplete Makefile targets. Add this to your shell config file.
complete -W "\`grep -oE '^[a-zA-Z0-9_-]+:([^=]|$)' Makefile | sed 's/[^a-zA-Z0-9_-]*$//'\`" make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment