I used to be able to type the following:
$> ./foo --arg=<TAB>
Where foo is any program I wrote, and it would give me a list of files in the current directory, just like tab-completion normally does. I didn't have to make any changes to /etc/bash_completion.
Recently, however, this has gone away for some unknown reason. Does anyone know how to re-enable this feature?
FWIW, this still does the correct thing (notice the lack of an equals sign):
$> ./foo --arg <TAB>
I resolved the same trouble with Ubuntu 12.04 by using https://github.com/ai/rake-completion. You need to
wget -O ~/scripts/rake https://raw.githubusercontent.com/ai/rake-completion/master/rake
. ~/scripts/rake
or You can use one of other ways on that page.
I removed all bash completion scripts and started adding them one by one to if any of them cause the problem.
In my case it turned out to be the npm completion script was the cause of this problem.
Not sure (yet) what the problem is, but this is the completion script which caused equal sign values not working as before:
Not sure what environment you're in, but on a recent CentOS
enables filename completion after a token w/o whitespace as the default. To toggle it in the other direction:
However, it looks like older versions of the builtin don't have the -D option.