Skip to content

Instantly share code, notes, and snippets.

@wizardishungry
Created August 14, 2012 17:27
Show Gist options
  • Save wizardishungry/3351011 to your computer and use it in GitHub Desktop.
Save wizardishungry/3351011 to your computer and use it in GitHub Desktop.
if [ -f /opt/local/etc/bash_completion ] && ! shopt -oq posix; then
. /opt/local/etc/bash_completion
fi
# only use __git_ps1 if the function is defined
type __git_ps1 2> /dev/null > /dev/null
if [ $? -eq 0 ]; then
export PS1='\! \h:\w$(__git_ps1)\$ '
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWDIRTYSTATE=1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment