mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

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.
14 lines
387 B
Bash
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
|