brew/Library/Homebrew/utils/zsh/brew-sh-prompt-zshrc.zsh
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

14 lines
387 B
Bash

# Read the user's ~/.zshrc first
if [[ -f "${HOME}/.zshrc" ]]
then
source "${HOME}/.zshrc"
fi
# Override the user's ZSH prompt with our custom prompt
export PROMPT="%B%F{green}${BREW_PROMPT_TYPE}%f %F{blue}$%f%b "
export RPROMPT="[%B%F{red}%~%f%b]"
# Add the Homebrew PATH in front of the user's PATH
export PATH="${BREW_PROMPT_PATH}:${PATH}"
unset BREW_PROMPT_TYPE BREW_PROMPT_PATH