[conspire] Obscure Way to Drastically Improve User Experience under Debian or K/X/Ubuntu (or MEPIS or Knoppix/Kanotix, etc.)

Daniel Gimpelevich daniel at gimpelevich.san-francisco.ca.us
Sat Dec 24 22:43:25 PST 2005

Most RPM-based distros, as well as DEB-based Fink, provide an optional
package, sometimes installed by default, that magically makes tabbing in
the bash shell context-sensitive. For example, without this package, if
you type "cd foo" and press tab when you have a file named foo1 and a
folder named foo2, it will beep and not do anything. A second tab will
show you both foo1 and foo2 as possible choices, because it's too stupid
to know that foo1 is a file, and that cd only operates on folders. If the
package is installed, the tab will choose foo2 for you. In fact, if you
have no other folders, only files, you could just type "cd " and press tab
for it to choose foo2 for you. This doesn't just apply to cd, but to all
sorts of commands, allowing you to type just part of an option or operand.
Where then, does one obtain such a magical package for Debian? The answer
is that under Debian, the stuff in that package is always installed, but
never used unless you deliberately enable it. Whereas under RPM-based
distros, the trick to enable or disable it is the simple installation or
removal of a single package, under Debian, it's buried in a config file.
Open the oddly named file /etc/bash.bashrc in your favorite editor with
superuser privileges, and you will see the last three lines of the file
commented out. Uncomment them and save changes. The next time you start a
shell, tabs will be context-sensitive.

More information about the conspire mailing list