Created
July 8, 2013 18:42
-
-
Save jasonroelofs/5951363 to your computer and use it in GitHub Desktop.
My current prompt
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
parse_git_dirty () { | |
if [[ $((git status 2> /dev/null) | tail -n1) = "" ]]; then | |
echo "" | |
elif [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then | |
echo "✗" | |
else | |
echo "" | |
fi | |
} | |
LIGHT_CYAN="\[\033[1;36m\]" | |
YELLOW="\[\033[1;33m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
WHITE="\[\033[1;37m\]" | |
export PS1="$LIGHT_CYAN\u@\h:$YELLOW\w $LIGHT_RED\$(parse_git_branch)$YELLOW\n] $WHITE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment