~tristan957/dotfiles

3dd668aa34c0f849683a760211db6554c7e97b5b — Tristan Partin a month ago 4807a71
Conditionally add git support to prompt if git-prompt can be found
1 files changed, 11 insertions(+), 9 deletions(-)

M bash/.bashrc
M bash/.bashrc => bash/.bashrc +11 -9
@@ 62,15 62,17 @@ BASH_DIR=$(dirname $(readlink -f "${HOME}/.bashrc"))
# Prompt

# Git branch for prompt
source "${BASH_DIR}/git-prompt.sh"
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_DESCRIBE_STYLE="auto"
GIT_PS1_HIDE_IF_PWD_IGNORED=1
GIT_PS1_STATESEPARATOR=" "
branch='$(__git_ps1 " \[$(tput setaf 39)\][%s]")'
if [[ -f "${BASH_DIR}/git-prompt.sh" ]]; then
	source "${BASH_DIR}/git-prompt.sh"
	GIT_PS1_SHOWDIRTYSTATE=1
	GIT_PS1_SHOWSTASHSTATE=1
	GIT_PS1_SHOWUNTRACKEDFILES=1
	GIT_PS1_SHOWUPSTREAM="auto"
	GIT_PS1_DESCRIBE_STYLE="auto"
	GIT_PS1_HIDE_IF_PWD_IGNORED=1
	GIT_PS1_STATESEPARATOR=" "
	branch='$(__git_ps1 " \[$(tput setaf 39)\][%s]")'
fi

function __prompt_extras() {
	PROMPT_EXTRAS=""