I've been meaning to find a solution for this for YEARS.
I am sooo much more productive in vim when manipulating files than bash for this reason.
If I have
file_12390983421
file_12391983421
file_12340983421
file_12390986421
In bash and type file_1->tab , it obviously lists:
file_12390983421 file_12391983421 file_12340983421 file_12390986421
And this is a horrible bore and painful to work with.
The same sequence in vim will loop through the files one at a time.
Please someone tell me how to do this in bash, or if there is another shell that can do this, I'll switch tomorrow.
Best Answer
By default
TAB
is bound to thecomplete
readline command. Your desired behavior would bemenu-complete
instead. You can change your readlines settings by editing~/.inputrc
. To rebindTAB
, add this line:For more details see the
READLINE
section inman bash
.