danneu
danneu

Reputation: 9444

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?

Upvotes: 7

Views: 1457

Answers (1)

Rag
Rag

Reputation: 6593

You could do

vim *h*<ENTER>

Shrug

Upvotes: 2

Related Questions