Skip to content

Instantly share code, notes, and snippets.

@benhamill
Created December 16, 2010 21:05
Show Gist options
  • Save benhamill/744012 to your computer and use it in GitHub Desktop.
Save benhamill/744012 to your computer and use it in GitHub Desktop.
#! /bin/bash
function git_prompt {
branch=$(__git_ps1)
if [ -n $branch ]; then
# color=$(status_color)
echo " "$branch
fi
}
# RED="\[\033[0;31m\]"
#
# function status_color {
# if current_git_status=$(git status | grep 'added to commit' 2> /dev/null); then
# echo $RED
# fi
# }
export PS1='\u@\h:\w$(git_prompt) \$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment