How to make BASH try and autocomplete on Enter

Posted by swatso33 on Super User See other posts from Super User or by swatso33
Published on 2012-06-16T12:37:38Z Indexed on 2012/06/16 15:18 UTC
Read the original article Hit count: 349

Filed under:

I've noticed that for many of the commands I use in bash I have actually learned how many letters of the command I must type before I can press [TAB] to have bash successfully autocomplete the command. For example when opening chromium I dont usually type the whole command but instead type

$ chrom[TAB][ENTER]

and bash successfully autocompletes the command to chromium before I hit the [ENTER] key. Is there a way to make autocomplete work without having to hit [TAB]? My general thinking is that if I type

$ chrom[ENTER]

bash could check and see that chrom isnt a valid command, but it would make sense to autocomplete it to chromium since that is the only command that starts with chrom

© Super User or respective owner

Related posts about bash