Created
July 9, 2011 19:34
-
-
Save tlrobinson/1073865 to your computer and use it in GitHub Desktop.
Autocomplete Makefile targets. Add this to your shell config file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
complete -W "\`grep -oE '^[a-zA-Z0-9_-]+:([^=]|$)' Makefile | sed 's/[^a-zA-Z0-9_-]*$//'\`" make |
complete -W "`make -qp | sed -n -E 's/^([^.#\s][^:=])(:$|:\s+.$)/\1/p' | sort -u'`" make
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it's broken when Makefile include other makefile