Skip to content

Instantly share code, notes, and snippets.

@prwhite prwhite/gist:1250016
Created Sep 29, 2011

Embed
What would you like to do?
Complete Makefile targets in tcsh
# 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
You can’t perform that action at this time.