I am running Kali Linux 2017.1 on my laptop.

I have a problem with Bash-completion. It seems to work perfectly with folders, command names and script names, but not with file names. When I enter a big part of a file and press Tab, Linux Bash doesn't do anything.

I have tried lots of Googling after this, and have tried the following solutions.

  1. Uncomment the if ! shopt -oq posix; then in ~/.bashrc ---> This was already uncommented.
  2. Uncomment the if ! shopt -oq posix; then in /etc/bash.bashrc ---> Didn't do anything.
  3. Reinstalling Bash-completion with apt install --reinstall bash-completion ---> No effect.
  4. Removing Bash-completion completely and then installing it again with apt autoremove bash-completion and apt install bash-completion --> No effect.
  5. Checking out /etc/inputrc ---> This file doesn't exist.
  6. Running chsh -s /bin/bash/ ---> Didn't do anything.
  7. Running mv -i bash_completion .bash_completion ---> Didn't do anything.
  8. Checking out ~/.bash_aliases ---> File doesn't exist.
  9. Checking out ~/.bash_profiles ---> File doesn't exist.
  10. Running shopt -u nullglob ---> Didn't do anything.
  11. Running mv ~/.bashrc ~./bashrc.bak, then cp /etc/skel/.bashrc ~/ ---> Bash-completion still didn't work for filenames, so then I restored the old .bashrc, with all my aliases.

I actually tried many more things, which I can't all recall.

It's pretty frustrating that no matter what I do or try, Bash-completion keeps refusing to work with files. What else can I try to make Bash-completion work with files?

closed as off-topic by terdon Sep 15 '17 at 13:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – terdon
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Did you try with ./ before the filename? Should not be needed, though. – mviereck Sep 1 '17 at 21:34
  • Yes, I have tried that. Putting a ./ before the filename doesn't help either. – Mark Wiering Sep 1 '17 at 21:49
  • 3
    Wait a moment, assuming filename is a file in your current working directory, do you try e.g. filen <Tab> <Tab>, or something like ls filen <Tab> <Tab>? – pfnuesel Sep 1 '17 at 22:07
  • I have tried both. The "ls filen <Tab> <Tab>" works, but the "filen <Tab> <Tab>" doesn't. – Mark Wiering Sep 2 '17 at 10:12
  • This isn't supposed to work... What do you want to achieve? – pfnuesel Sep 2 '17 at 14:39

Browse other questions tagged or ask your own question.