Add Makefile completion

Sometimes, Makefile won't be completed (as for me on Fedora 25) as soon as bash-it is activated. This completion script can provide a Makefile completion.
pull/865/head
Patrice Ferlet 2016-12-21 10:20:36 +01:00
parent afa7a01dd5
commit d057865c24
1 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# Add completion for Makefile
# see http://stackoverflow.com/a/38415982/1472048
complete -W "\`grep -oE '^[a-zA-Z0-9_-]+:([^=]|$)' Makefile | sed 's/[^a-zA-Z0-9_-]*$//'\`" make