Add FAAAAAH meme sound to your shell on every non-0 command output. Task failed successfully.
demo.mp4
We hook into your shell's lifecycle:
- Bash: Abusing the
PROMPT_COMMANDenvironment variable. - Zsh: Using
precmdviaadd-zsh-hook.
Right before dropping a new prompt, the script checks if the last command failed ($? != 0). If it did, it spawns an isolated background subshell to play the sound. Zero overhead, zero UI blocking. Just auditory feedback.
Tip
- 🟦 Native Windows (PowerShell): We have a dedicated, pure PowerShell implementation. See the windows-powershell folder for details!
We added native support for:
-
🐧 Native Linux: Automatically finds your system's default audio players (
paplayfor PulseAudio,aplayfor ALSA). -
🍎 macOS: Uses the built-in
afplaycommand. -
🪟 WSL (Windows Subsystem for Linux): Playing audio inside WSL requires annoying external setups. We bypassed them entirely.
How? The script detects WSL, copies the
FAAAAH.wavfile toC:\Users\Public\.faaaah-listener\, and uses WSL's interoperability to call PowerShell (powershell.exe) and play the sound using native WindowsMedia.SoundPlayer. It just works™.
- Clone or download this repo somewhere safe.
- Run the install script:
./install.sh
- Reload your shell and make a typo on purpose:
source ~/.zshrc # (or ~/.bashrc)
To remove the listener:
./uninstall.shThen reload your shell to kill the background process.