In directory with many files but only a few directories autocomplete is very slow for directories. If I type
cd something tab it will take ages to autocomplete. Presumably this is because it is searching through all the files. However, it is already set up (by default) to only autocomplete to directories (as explained in Can the command completion for `cd` be modified to only show directories and ignore files?) so it should have no business searching the files. Is there anything I can do about this?
(On: Ubuntu 18.04.1 LTS)