Skip to content

Instantly share code, notes, and snippets.

@weargoggles
Created November 13, 2014 10:37
Show Gist options
  • Save weargoggles/e83c338df5518f567391 to your computer and use it in GitHub Desktop.
Save weargoggles/e83c338df5518f567391 to your computer and use it in GitHub Desktop.
# Source Debian/Ubuntu bash completion
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# Source Apple-style bash completion and prompting
if [ -f /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash ]; then
. /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
. /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
fi
if typeset -tf __git_ps1 >/dev/null 2>&1; then
_git_prompt_cmd='\[\033[35m\]$(__git_ps1 "(%s) ")\[\e[00m\]'
fi
export GIT_PS1_SHOWDIRTYSTATE=1;
PS1="$_git_prompt_cmd$PS1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment