Skip to content

Instantly share code, notes, and snippets.

@tboyce12
tboyce12 / .bashrc
Last active December 25, 2015 17:49
Shell prompt w/user, directory, git branch with dirty status
tb_is_git_dirty() {
git_status="$(git status 2> /dev/null)"
if [[ ${git_status} =~ "nothing to commit" ]]; then
return 0
else
return 1
fi
}
__tb_git_status() {
git_status="$(git status 2> /dev/null)"