Created
March 12, 2022 11:54
-
-
Save tanmay27vats/97b11d73092da55e67906509ccb521d1 to your computer and use it in GitHub Desktop.
Add git branch name to shell prompt in Ubuntu with custom text. Sudo nano ~/.bashrc
This file contains hidden or 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
# Colors definition | |
BLUE='\e[94m' | |
L_BLUE='\e[96m' | |
YELLOW='\e[93m' | |
GREEN='\e[32m' | |
L_GREEN='\e[92m' | |
RED='\e[31m' | |
L_RED='\e[91m' | |
NC='\e[0m' | |
export GIT_PS1_SHOWDIRTYSTATE=true # show * for changes | |
export GIT_PS1_SHOWUNTRACKEDFILES=true # show % for new files | |
#export PS1="$GREEN\u$YELLOW@$L_GREEN\h$YELLOW: $BLUE\W $L_RED\$(__git_ps1)$NC $ " | |
# Something stylish & cool with custom text. ;) | |
export PS1="$GREEN\u$YELLOW is working on $BLUE\W$L_GREEN @$L_RED\$(__git_ps1)$NC $ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment