0

Bash auto completion seems to work normally except on files.

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

/
 folder1/
  folder2/
   fileName
   nameOfFile
  other2/
 otherfolder/

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

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

what gives?

2 Answers 2

2

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.

2
  • everything should show up when tab completing with ls as well
    – h3rrmiller
    Commented Jan 11, 2013 at 2:18
  • @h3rrmiller ya pretty much any command that has auto complete operates on files should work
    – Karthik T
    Commented Jan 11, 2013 at 2:20
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .