How to get tab auto complete in bash to scroll through all possible choices
If there are more than one possible choices, pressing <tab> twice will display them. How to I get it to scroll through each choice each time I press <tab> (like in dos)? For example, if I have:
Use <ctrl><r> for this.
So in terminal, press <ctrl> and <r> simoultaneously* and then type in a few letters. Press <ctrl><r> to get to next command etc.
Here is a link to a quick-sheet http://"http://www.catonmat.net/down...eat-sheet.pdf"
and a pretty handy idea:
* (Did I spell that correctly? Looks kinda weird...)
Your first link is "not found". Try this
( And it's "simultaneously" but no matter ;) )
Thanks for the "cheat sheet".
Interesting links but joeldick was asking about command completion, not searching command history ...
But, for the full story, see /etc/bash_completion
It's "just" a script, but that's where bash completion happens and its behaviour is defined.
It's 9400 lines for my version and is very cryptic to my eye (you'll need to be up to speed on bash awk perl & sed, to follow it, but if you'd like a different ("improved"), behaviour, this is the place to look, and tweak the code. Make a backup before you begin!
Also remember that there are many different shells you can use: zsh csh ksh ... the list goes on and on. They all offer different features. Maybe try some of them out.
Windows-style auto completion for bash
I just discovered an easy answer on another forum. Add the following command to your .bashrc file
(or just execute it directly):
bind '"\C-i": menu-complete'
|All times are GMT -5. The time now is 08:21 AM.|