brew/Library/Homebrew/utils/bash/brew-sh-prompt-bashrc.bash
Mike McQuaid 5fe43ed3f2
brew (bundle|) sh: use user's configuration but override prompts.
This was more painful that I expected but will allow `brew bundle sh`
and `brew sh` to use the user's configuration but use our custom prompt
for Bash and ZSH.
2025-06-05 15:43:34 +01:00

13 lines
397 B
Bash

# Read the user's ~/.bashrc first
if [[ -f "${HOME}/.bashrc" ]]
then
source "${HOME}/.bashrc"
fi
# Override the user's Bash prompt with our custom prompt
export PS1="\\[\\033[1;32m\\]${BREW_PROMPT_TYPE} \\[\\033[1;31m\\]\\w \\[\\033[1;34m\\]$\\[\\033[0m\\] "
# Add the Homebrew PATH in front of the user's PATH
export PATH="${BREW_PROMPT_PATH}:${PATH}"
unset BREW_PROMPT_TYPE BREW_PROMPT_PATH