I have moved from Ubuntu 14.04 to 16.04 (new installation). On 14.04 I had no problems with tab completion. However on 16.04 I have problems especially with vi:

In some directories (e.g. ~/ , /etc, /usr/src, /usr/src/mywork) I type vi a, hit tab and I can tab through all files and directories which starts with a.

In other directories (/usr/src/mywork/work and all subdirctories) it doesn’t work: I type vi a (there are file which starts with a) and hit tab and I can tab only through all directories which starts with a; no files are displayed. I can edit the files if I type the full name of the file.

The tab completion work fine in all directories: for example with cat, rm; and more. Therefore I think that it is a problem of vi. Please, has somebody an idea? Thanks in advance

What did I do until now?

reinstall: aptitude reinstall bash-completion

change ownership: chown root:root * (also in all mother directories)

restored .bashrc: cp /etc/skel/.bashrc ~/.

My .vimrc is:

syntax on
set t_Co=256
colorscheme a-Wombat
if &diff
    colorscheme apprentice


This worng behaviour is driven by a a file called ! in the directory. If one removes the file named ! everthing is working fine. However if one wants to fix the behaviour one has to install the latest git of bash-completion.


Valentas has reportet this as a bug in Ubuntu. Thanks!

  • 2
    What does complete -p vi report? – muru Oct 23 '16 at 15:50
  • Hi muru, the result is complete -F _filedir_xspec vi. I fixed it due to your comment in "vi and vim". I had a file named "!" which distrubed the tab completion. THANKS again! – musbach Oct 23 '16 at 18:32
  • 2
    You should add this as an answer. I filed a bug report. bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1637193 – Valentas Oct 27 '16 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.