Install Bash Completion on macOS

Bash completion is a set of command line command completions for the Bash shell, it contains a collection of helper functions to assist in creating new completions. It also provides a set of facilities for loading completions automatically on demand, as well as installing them.

Official Webpage:


  • Open Terminal App,
  • Type Command: brew install bash-completion
  • Once installation is complete, please add the path of to the bash profile file ~/.bash_profile
    Add the following line to your ~/.bash_profile:
      [[ -r "/opt/homebrew/etc/profile.d/" ]] && . "/opt/homebrew/etc/profile.d/"
  • Run command source ~/.bash_profile
Install bash completion on macOS

Have Questions? Post them here!

Top Hashtags: