Skip to content

Instantly share code, notes, and snippets.

@kcmerrill
Last active March 20, 2017 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kcmerrill/5068b971516e8add8239 to your computer and use it in GitHub Desktop.
Save kcmerrill/5068b971516e8add8239 to your computer and use it in GitHub Desktop.
export PS1='\[\e[01;30m\]\@`if [ $? = 0 ]; then echo "\[\e[32m\] ✔ "; else echo "\[\e[31m\] ✘ "; fi`\[\e[00;37m\]\u \[\e[01;37m\]`[[ $(git status 2> /dev/null) =~ Changes\ to\ be\ committed: ]] && echo "\[\e[33m\]" || echo "\[\e[31m\]"``[[ ! $(git status 2> /dev/null) =~ nothing\ to\ commit,\ working\ .+\ clean ]] || echo "\[\e[32m\]"`$(__git_ps1 "(%s)\[\e[00m\]")\[\e[01;34m\] \W\[\e[00m\] ] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment