Many bash completions call 'compopt -f' or 'compopt -d' inside $() instead of _filedir, and that means that they don't work with filenames/dirnames that contain spaces. I reported one instance: https://bugs.gentoo.org/show_bug.cgi?id=417715 But then I discovered that there are a lot of completions that do this. Just run: * fgrep 'compgen -f' /etc/bash_completion.d/* * fgrep 'compgen -d' /etc/bash_completion.d/* To get an idea of how many completions have this problem. One of: _filedir _filedir -d _filedir "$EXTENSIONS" should be used instead.
Please file new bug reports for any bashcomp files that need fixing so that each bug can be assigned to the packages' respective maintainers. Make all those bugs block this one. Also, please respect the quiet of this tracker bug unless talk is about the tracker itself.