Install bash-completion on FreeBSD 12
Bash completion is a functionality through which bash helps users type their commands faster and easier. It accomplishes that by presenting possible options when users press the tab key while typing a command.
This tutorial assumes you have bash installed and its set as default on your FreeBSD system. Please refer to https://opentechy.com/how-to-install-bash-on-freebsd-12/ on how install bash and set as default shell.
To use it, you need 2 steps:
Step 1: Install bash-completion:
pkg install bash-completion
Step 2: Add following command in your ~/.profile:
[[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] && \
source /usr/local/share/bash-completion/bash_completion.sh