Monday, February 20, 2017

Better GIT Bash Prompt Formatting than Caroline's

Back to list
If you set background to white, you might be okay, but, if you prefer the night theme, like I do, you might prefer bold blue :

bolblue="\[\033[01;34m\]"

# Change command prompt
source ~/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
# '\u' adds the name of the current user to the prompt
# '\$(__git_ps1)' adds git-related stuff
# '\W' adds the name of the current directory
export PS1="$purple\u$green\$(__git_ps1)$bolblue \W $ $reset"

No comments: