Ubuntu 14: enabling bash completion

To enable bash completion  on Ubuntu 14 make sure you have bash-completion installed:

apt-get install bash-completion

If so open /etc/bash.bashrc:

vim /etc/bash.bashrc

Then comment out the following lines:

# enable bash completion in interactive shells
 if ! shopt -oq posix; then
 if [ -f /usr/share/bash-completion/bash_completion ]; then
 . /usr/share/bash-completion/bash_completion
 elif [ -f /etc/bash_completion ]; then
 . /etc/bash_completion
 fi
 fi

And restart you bash:

exec $SHELL