Skip to content

Commit

Permalink
Fixed prompt for when git repo is dirty
Browse files Browse the repository at this point in the history
Git changed it's output for determining when a working directory is clean.
  • Loading branch information
rmm5t committed Nov 15, 2012
1 parent 5fc9800 commit 773aefc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bashrc
Expand Up @@ -92,7 +92,7 @@ esac
# Show the git branch and dirty state in the prompt.
# Borrowed from: http://henrik.nyh.se/2008/12/git-dirty-prompt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
Expand Down

0 comments on commit 773aefc

Please sign in to comment.