Created
April 9, 2009 12:27
-
-
Save nalanj/92436 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
# My command prompt, ripped from someone online that I don't have a link for. Sorry! | |
function git_current_branch { | |
git branch 2>/dev/null | awk '/^\* /{print " " $2}' | |
} | |
function git_dirty { | |
git status 2>/dev/null | wc -l | awk '{if ($1 > 2) print "*"}' | |
} | |
export PS1="[\w\$(git_current_branch)\$(git_dirty)]: " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment