bash-preexec

Install command:
brew install bash-preexec

Preexec and precmd functions for Bash (like Zsh)

https://github.com/rcaloras/bash-preexec

License: MIT

Development: Pull requests

Formula JSON API: /api/formula/bash-preexec.json

Formula code: bash-preexec.rb on GitHub

Bottle (binary package) installation support provided.

Current versions:

stable ✅ 0.7.0
head ⚡️ HEAD
Add the following line to your bash profile (e.g. ~/.bashrc, ~/.profile, or ~/.bash_profile)
    [ -f $HOMEBREW_PREFIX/etc/profile.d/bash-preexec.sh ] && . $HOMEBREW_PREFIX/etc/profile.d/bash-preexec.sh

GitHub Packages downloads:

Last 30 days5,622
Downloads51,055
Analytics install events (30 days)2,563
Downloads / install events (30 days)2.2×

Source: GitHub Packages, fetched 2026-11-16T00:54:43Z. Analytics dates: 2026-10-17 to 2026-11-16. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs2,5635,49417,035
Installs (--HEAD)001
Installs on Request2,5625,49417,035
Installs on Request (--HEAD)001
Build Errors0