Last active
June 12, 2020 16:15
-
-
Save gabrielqmatos88/a34c27299e57b660fb2bb773f9b94f12 to your computer and use it in GitHub Desktop.
bash PS1 color format
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
# without git | |
#----------------------------------------------------------------------------------------------------------------------------------------- | |
export PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\e[34;40m\]\u@\h \[\033[35m\]$MSYSTEM\[\033[33m\]\w\[\033[36m\]\[\033[0m\]\n$' | |
# with git | |
#----------------------------------------------------------------------------------------------------------------------------------------- | |
export PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\e[34;40m\]\u@\h \[\033[35m\]$MSYSTEM\[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$' | |
#----------------------------------------------------------------------------------------------------------------------------------------- | |
with git green/yellow | |
#----------------------------------------------------------------------------------------------------------------------------------------- | |
export PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment