Files
ghostty/src/shell-integration/bash
Jon Parise 4b9324f48a bash: suppress __ghostty_hook errors in inherited PROMPT_COMMAND
When some tools spawn subshells, PROMPT_COMMAND may be inherited as an
environment variable while the __ghostty_hook function is not (bash
doesn't export functions by default). This causes "command not found"
errors on every prompt in the subshell.

Add 2>/dev/null to the __ghostty_hook entry in PROMPT_COMMAND so that it
silently no-ops in subshells where the function isn't defined. This also
silences any errors from inside __ghostty_hook itself, but those are all
terminal escape sequences and non-actionable.

See: #11245
2026-03-20 09:41:34 -04:00
..