Created
April 9, 2021 22:21
-
-
Save OnceUponALoop/0537c4273e61146c7e78ce008f6e6e19 to your computer and use it in GitHub Desktop.
Bash profile - set console color if admin mode in msys
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
if [ $(net session > /dev/null 2>&1; echo $?) -eq 0 ]; then | |
# Set Background Color | |
echo -ne '\e]11;#800F00\a' | |
# Set PS1 | |
export PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[7m\][Admin]\[\033[0m\] \[\033[32m\]\u \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n# ' | |
else | |
#Set PS1 | |
export PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$ ' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment