Add a nice bash prompt
This commit is contained in:
parent
93f32dd4bf
commit
b4c49b3552
11
bash/.bashrc
11
bash/.bashrc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user