Add a nice bash prompt

This commit is contained in:
Jeremy Dormitzer 2021-01-05 13:26:52 -05:00
parent 93f32dd4bf
commit b4c49b3552

View File

@ -53,3 +53,14 @@ export BASH_SILENCE_DEPRECATION_WARNING=1
# AWS
export KOPS_STATE_STORE=s3://lola-kops-cluster-state
# bash prompt
if [ -f "/usr/local/opt/bash-git-prompt/share/gitprompt.sh" ]; then
__GIT_PROMPT_DIR="/usr/local/opt/bash-git-prompt/share"
source "/usr/local/opt/bash-git-prompt/share/gitprompt.sh"
else
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "
fi