1

Right now, I am in the directory migrate in my current Rails project, and have the following migrations:

20140206000143_create_users.rb   20140206032051_create_comments.rb 
20140209232521_create_login.rb   20140206031331_create_photos.rb  
20140206034224_load_data.rb

I want to select 20140209232521_create_login.rb using tab completion but it becomes complicated because I have to pay attention to where the different filenames differ. Is there any way to select the file I'm looking for quickly?

Thanks!

Tyler
  • 11,272
  • 9
  • 65
  • 105

2 Answers2

0

Not without the bash_completion package installed, but it is fairly rudimentary compared the zsh tab completion. The native tab-completion in zsh is streets ahead. Zsh will cycle through your files with each tab, or you can tab complete wildcards, for example 'vi *users' would expand to 'vi 20140206000143_create_users.rb'

elcaro
  • 2,227
  • 13
  • 15
0

With Bash, using the menu-complete function instead of the normal complete make get you closer to what you want:

bind C-i:menu-complete

With this setting, pressing the <tab> key will cycle between possible completions.

larsks
  • 277,717
  • 41
  • 399
  • 399