Is it possible for bash completion to cycle through the alternatives?
Bind the Tab key to the menu-complete
command instead of the default complete
. Put the following line in your ~/.bashrc
:
bind '"\C-i": menu-complete'
or the following line in your ~/.inputrc
(this will apply to all programs that use the readline library, not just bash):
"\C-i": menu-complete
In bash 4.1 and later you can also use menu-complete-backward
to cycle through completions backwards. I have this in my ~/.inputrc
:
"\es": menu-complete-backward
"\et": menu-complete