For a while now I'm experiencing an annoying bash-completion problem, namely it doesn't work when a path contains an escaped space. For example, I am in /cygdrive/c and type
$ cd Pro
pressing Tab key completes to "cd Program", pressing twice shows all directories with this "Program" prefix:
Program Files/ Program Files (x86)/ ProgramData/
I want to cd to "Program Files" so I type
$ cd Program\
(with space after backslash) and from now on pressing Tab does nothing. It used to work some time ago but I cannot identify when exactly it stopped. Any hints on what can be the cause of this?
It looks like the there is a problem with the bash_completion
package. I was having your problem with cd
but not other programs like ls
. You can either remove that package or put complete -r cd
in your .bashrc
.