Follow simple steps to install bash-preexec on Mac

Package Information:

Name: bash-preexec
Use: preexec and precmd hook functions for Bash in the style of Zsh
URL: https://github.com/rcaloras/bash-preexec

Installation Steps:

  1. Open Terminal.
  2. Now, run
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
  3. Install bash-preexec using brew
    brew install bash-preexec

bash-preexec is ready to use now!