I now use git quite a lot for various projects. I noticed that on one computer I had very handy tab completion, and the other one did not. They are both running Ubuntu 8.10, so there shouldn’t be a difference.
It turns out that I had enabled bash completion on one machine but not on the other.
To enable it for all users on your system you need to edit /etc/bash.bashrc and uncomment lines 32 – 34 (in the default file) so it looks like:
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
Open a new terminal and auto-completion should now work.
