Paco

Personal Content Organiser

Home / Linux / Debian/Ubuntu

Navigation

Menu

Search

Awesome tab completions

In Debian, the Bash package comes with a totally awesome collection of customized tab completions. For some reason, they are not turned on by default.

To turn them on in a single account, you can put the line "source /etc/bash_completion" in your ~/.bashrc file, or you can turn them on globally by editing the /etc/bash.bashrc file and uncommenting the relevant lines.

You'll get magic smart tab completion for cd, apt-get, ssh, mplayer, and bajillions of other programs, and you'll wonder how you ever did without it. apt-get tab completion in particular rocks like nothing else.

For example, if you type "apt-get remove x[TAB]" you'll get a complete list of installed packages starting with x. When installing, you'll get a list of available but not yet installed packages. I can't stand using apt-get without tab completion anymore.


e.g.

in /etc/bash.bashrc

uncomment these:
if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi



source: http://www.debian-administration.org/articles/316