Skip to content

Instantly share code, notes, and snippets.

@tangzero
Created May 11, 2010 18:13
Show Gist options
  • Save tangzero/397627 to your computer and use it in GitHub Desktop.
Save tangzero/397627 to your computer and use it in GitHub Desktop.
Show some usefull info
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
export PS1='\[\033[1;38m\]\u\[\033[1;32m\] `~/bin/rvm-prompt i v g`\[\033[1;31m\] \W\[\033[1;33m\]`\
git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/[\\\\\1$(parse_git_dirty)]\/` \[\033[37m\]$\[\033[00m\] '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment