Created
July 3, 2012 00:30
Revisions
-
dsibilly created this gist
Jul 3, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ function parse_git_dirty { [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working direct ory clean)" ]] && echo "*" } function parse_git_branch { git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(par se_git_dirty)]/" } RED="\[\033[0;31m\]" YELLOW="\[\033[0;33m\]" GREEN="\[\033[0;32m\]" RESET="\[\033[0;0m\]" PS1="$RED\h:\W$YELLOW \$(parse_git_branch)$GREEN\$$RESET "