BASH auto-complete of command names

liunx

Guest
When in bash, I can type the beginning of a command name (which is not necessarily in the current directory), hit tab a couple times, and a list of commands is displayed which start with what I have typed (almost looks like the list is being displayed with 'more', but I have to press Enter to scroll down the list). <br /><br />My question is this, how does this functionality work? I want to be able to get a list of all commands that are auto-complete-able via hitting tab twice, so that I can pipe it to a file or grep.
</div>
 
Top