Last active
August 17, 2023 00:45
-
-
Save gregjhogan/0444ec69708755474a9665029db4ba9c to your computer and use it in GitHub Desktop.
bash prompt with git status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE=true | |
PS1='\[\033[1;32m\]\u@\h \[\033[0;36m\]\w\[\033[1;33m\]$(__git_ps1 " (%s)")$([ $? -ne 0 ] && echo -n " \[\e[0;31m\]!")\n\[\033[0m\]$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment