thanks to Etan's comment and Aaron's indication of where makefiles are, I managed to debug this.
I ran set -x
so I could track what was happening when doing the tab completion. The output of make c<tab>
consists mostly of commands from the bash completion file for make
, located at /usr/share/bash-completion/completions/make
(1).
However, I noticed the an inconsistency between the output and the file. Towards the end, the output said:
+ local mode=--
+ (( COMP_TYPE != 9 ))
++ set +o
++ grep --colour=auto -n -F posix
+ local 'reset=23:set +o posix'
+ set +o posix
Which I identified as corresponding to these lines from the file:
if (( COMP_TYPE != 9 )); then
mode=-d # display-only mode
fi
local reset=$( set +o | grep -F posix ); set +o posix # for <(...)
So the output did a grep --colour=auto -n
instead of just grep
. Indeed, I had setup this alias for grep
Make worked as soon as I removed the alias.
I hope this helps others debug their problems.
EDIT: I have submitted a bug report here: https://alioth.debian.org/tracker/index.php?func=detail&aid=315108&group_id=100114&atid=413095
man
page forset
. Tryhelp set
(help
is an internal BASH command) orman bash
orinfo bash
.type set
andcommand set
return in the shell? What do you get if you runset -x
and then trigger this issue?type set
says it's a bash built in.command set
spits out all my environment variables and a ton of bash functions.set -x
produces this regarding the error: + 23:set +o posix bash: 23:set: command not found