Concept
libreadline is the library that everybody uses nowadays for advanced text input at the console. It supports command history, arrow keys, inserting/deleting text, and the golden feature -- tab completion.
But the tab comppletion could be better; if you hit tab when there's more than one match, it just pukes out a list of every possible match (piping it to more (or less) so that it doesn't scroll off the screen if there's too much, which there frequently is).
Why??
libreadline uses curses to do its magic, and, as we all know, curses can do those funky text based menus that you see in a myriad of cool apps (linux's 'make menuconfig', iptraf, bmon, htop, bittorrent, etc.)
So, why not take advantage of this awesome feature and show the tab-completion matches in a popup window?
I propose an (optional) feature where hitting tab pops up a floating window with a list of matches that can be scrolled with the arrow keys or filtered further by typing more letters. Once the window has popped up, hitting tab is equivalent to the down arrow key. Also, the current match you have selected will be shown on the commandline. Typing a character that's doesn't result in a match will destroy the popup window and let you keep typing.
Example:
prompt> mv fi<TAB> [window pops up with all matches, first one is "filename", "filename" is automatically filled in since it's the first match in the list] prompt> mv filename [user hits space, popup window disappears since "filename " is not in the list] prompt> mv filename /theDirectory
Wow, look at how much time you saved since the first match was autocompleted! ONE TAB PRESS! AMAZING!
Someone do this please.
Resources
GNU readline documentation (includes API)
GNU readline patch that autocompletes as you type (no TAB necessary!)
