Created
September 29, 2011 05:04
-
-
Save prwhite/1250016 to your computer and use it in GitHub Desktop.
Complete Makefile targets in tcsh
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
# first grep finds lines with potential commands | |
# second grep throws away pure comment lines | |
# then sed throws away anything after initial target name (which should just be the : now) | |
# final uniq throws away dups | |
# could be more optimal :) | |
# could probably do something to generate completes from -f makefile name | |
alias makeCommands 'echo `egrep --only-matching "^.*?: " Makefile | egrep -v "^[[:space:]]*#" | sed "s/\(:.*\)//" | uniq`' | |
complete make 'n/*/`makeCommands`/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment