After some unspecified point in the past, my bash completion has acted strangely:
- if I begin a filename to complete with
~/, I cannot complete filenames, only directory names, and the suggested names (if I press tab twice) show only directories (including hidden ones)
- sometimes, under random circumstances, completing relative paths also has the above restrictions (most recently, trying to complete while in a subdirectory of /tmp exhibited this behavior)
- if I start a command line as
VAR= -l(space)for any
-land press tab, bash-complete throws up its "unknown argument/incorrect syntax" help message (in my case, I wanted to tab-complete an
LDFLAGS=-L/...whose spaces would be removed once I found the directory that had the libraries)
Everything else (completing absolute pathnames, command completion, etc.) works as expected. I do not have the
/dir(space) tab-completion behavior that other questions about bash-complete found here and on Google cover.
I tried removing /etc/bash_completion.d to no avail.
sudo apt-get --reinstall install bash-complete did not work either.
complete -r restores the intended behavior, so it is an issue with bash_completion... this has persisted across several updates to the bash-completion package as well.
I am on Kubuntu 14.04; this happens both in Konsole and in virtual terminals.
What could be going on? Thanks!