Skip to content

Instantly share code, notes, and snippets.

@mathie
Created March 18, 2010 13:08
Show Gist options
  • Save mathie/336325 to your computer and use it in GitHub Desktop.
Save mathie/336325 to your computer and use it in GitHub Desktop.
function smiley() {
if [ $? = 0 ]; then
printf $1
else
printf $2
fi
return $?
}
# Show lots of info in the __git_ps1 output.
export GIT_PS1_SHOWDIRTYSTATE="true"
export GIT_PS1_SHOWSTASHSTATE="true"
export GIT_PS1_SHOWUNTRACKEDFILES="true"
export PS1='$(smiley "\[\033[01;32m\]:)\[\033[00m\]" "\[\033[01;31m\]:(\[\033[00m\]") \[\033[01;34m\]\W\[\033[00m\] \[\033[01;36m\]$(rvm-prompt)\[\033[00m\]$(__git_ps1 " \[\033[01;35m\](%s)\[\033[00m\]") \$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment