I’m assuming that you have Homebrew installed.
# Tap homebrew/versions so you can install bash completion 2 brew tap homebrew/versions brew install bash-completion2 # Tap homebrew/completion to gain access to these brew tap homebrew/completions # Install completions for docker suite brew install docker-completion brew install docker-compose-completion brew install docker-machine-completion
You need to add the following to your
~/.bash_profile file and reload your bash with
exec $SHELL -l or restart your terminal.
# Bash additional completion scripts if [ -f $(brew --prefix)/etc/bash_completion ]; then . $(brew --prefix)/etc/bash_completion fi
Want more completion scripts? Check out Homebrew Completion on GitHub.
Also worth seeing how you can add Git Completion commands.