Bash command completion (autocomplete), is a built-in bash function.
See man complete
or man bash
in the 'complete' section.
By default, bash does not autocomplete bash aliases. Here is a feature request filed for it:
http://savannah.gnu.org/support/index.php?108476
See also:
http://linux.overshoot.tv/app-shells/bash-completion
/usr/share/bash-completion
/etc/bash_completion.d/
It is said that the zsh shell has a more powerful, flexible command autocompletion implementation than bash.