Created
November 29, 2008 10:59
-
-
Save jmhodges/30224 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# This assumes you've already got the stuff from git-completion.bash source'd in. | |
git_dirty_status () | |
{ | |
local gitstat="$(git status 2>/dev/null)" | |
local dirty="$(echo $gitstat | grep 'added to commit' 2>/dev/null)" | |
if [ -n "$dirty" ]; then | |
printf " ⚡" | |
fi | |
} | |
export PS1='\u @ \h: \w $(__git_ps1 " (%s) ")$(git_dirty_status)\n→ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment