Created
December 15, 2009 23:09
-
-
Save granth/257393 to your computer and use it in GitHub Desktop.
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 characters
export PATH=$HOME/bin:/usr/local/bin:/usr/local/git/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/X11R6/bin:$PATH | |
source /usr/local/git/contrib/completion/git-completion.bash | |
prompt_status() { | |
local branch=$(__git_ps1 "%s") | |
if [ -n "$branch" ]; then | |
if git_dirty; then | |
echo "⚡" | |
return | |
fi | |
fi | |
echo "→" | |
} | |
git_branch() { | |
local branch=$(__git_ps1 "%s") | |
if [ -n "$branch" ]; then | |
if [[ ! $(git config homedir.repo) ]]; then | |
echo -n "$branch" | |
fi | |
fi | |
} | |
git_dirty() { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment