Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In terminal (Bash), how do you autocomplete partial matches in the middle of a filename?

I have a bunch of files named things like:

2011-04-02-hello.rb
2011-04-02-bye.rb
2011-06-22-cat.rb
2011-06-17-dog.rb

Ideally, I could access the first file by typing vim h<TAB>, and it'd autocomplete the rest.

In terminal, how can I autocomplete a filename with a partial match in the middle of the name?

like image 754
danneu Avatar asked Aug 04 '11 19:08

danneu


1 Answers

You could do

vim *h*<ENTER>

Shrug

like image 181
Rag Avatar answered Sep 25 '22 14:09

Rag