Skip to content

Instantly share code, notes, and snippets.

@okohs
Created November 13, 2017 07:54
Show Gist options
  • Save okohs/e0a6dfe290cb2c7973123ae420cd1c0f to your computer and use it in GitHub Desktop.
Save okohs/e0a6dfe290cb2c7973123ae420cd1c0f to your computer and use it in GitHub Desktop.
.bashrc
# define for PS1
txtblk='\e[30m' # Black - Regular
txtred='\e[31m' # Red
txtgrn='\e[32m' # Green
txtylw='\e[33m' # Yellow
txtblu='\e[34m' # Blue
txtpur='\e[35m' # Purple
txtcyn='\e[36m' # Cyan
txtwht='\e[37m' # White
# display git status
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\u@\["txtgrn"\]\w\["txtred"\]\[$(__git_ps1 [%s])\["txtwht"\]> '
@foooomio
Copy link

# define for PS1
txtblk=$'\e[30m' # Black - Regular
txtred=$'\e[31m' # Red
txtgrn=$'\e[32m' # Green
txtylw=$'\e[33m' # Yellow
txtblu=$'\e[34m' # Blue
txtpur=$'\e[35m' # Purple
txtcyn=$'\e[36m' # Cyan
txtwht=$'\e[37m' # White

# display git status
GIT_PS1_SHOWDIRTYSTATE=true
export PS1="\u@\[$txtgrn\]\w\[$txtred\]\$(__git_ps1 [%s])\[$txtwht\]> "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment