agaskar.com

Auto-completion with apt-get

tab completion with apt-get install is possible by sourcing the bash_completion script -- which should already live in /etc/bash_completion if you're running debian. Simply type:

source /etc/bash_completion

Very handy -- I've sometimes had to look at package names two or three times before typing them in correctly. This also enables tab completion for a number of other things.

To have bash_completion enabled every time you login, add the following line to your /etc/profile file:

source /etc/bash.bashrc

Then open /etc/bash.bashrc, and uncomment or add the following lines:

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

EDIT: I've read some complaints that bash_completion overrides or breaks typical tab-completion behavior. I haven't noticed any instances yet, but caveat emptor.