completions/makefile: Support GNUmakefile and makefile

Close #216
This commit is contained in:
Jean-Sébastien Hedde
2021-05-07 20:45:04 +02:00
committed by Koichi Murase
parent f00c82341c
commit f364333dfd

View File

@@ -1,3 +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
complete -W "\`find . -maxdepth 1 -iname '*makefile' -exec grep -oE '^[a-zA-Z0-9_-]+:([^=]|$)' {} \; | sed 's/[^a-zA-Z0-9_-]*$//'\`" make