Bash auto completion seems to work normally except on files.

ie, if I am in / and there is some directory structure


I can type cd f(tab)f(tab) to get "cd folder1/folder2/"

but when in folder2/ typing fi(tab) does nothing.

what gives?


When you use cd it only auto completes folder names since you can only cd to folders.

You can try with cat ./<tab-tab> to get your files.

| improve this answer | |
  • everything should show up when tab completing with ls as well – h3rrmiller Jan 11 '13 at 2:18
  • @h3rrmiller ya pretty much any command that has auto complete operates on files should work – Karthik T Jan 11 '13 at 2:20

I have had this problem occasionally and here are my two common causes:

ID10t Error: I spell the filename incorrectly.

Not Specific Enough: I may type "file", but in that directory I have two files - file1 and file2. When using autocomplete, be as specific as possible and be aware of files that begin with the same few characters.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.