Skip to content

Instantly share code, notes, and snippets.

@wtowns
Created June 12, 2013 16:20
Show Gist options
  • Save wtowns/5766854 to your computer and use it in GitHub Desktop.
Save wtowns/5766854 to your computer and use it in GitHub Desktop.
# Custom prompt: User@Location (current git branch)\n$
if type -t __git_ps1 | grep -q '^function$' 2>/dev/null; then
export PS1='\[\033[0m\]\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[36m\]$(__git_ps1) \[\033[0m\]$ '
else
export PS1='\[\033[0m\]\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[36m\] \[\033[0m\]$ '
fi
@wtowns
Copy link
Author

wtowns commented Jun 12, 2013

Add to ~/.bashrc. Make sure to have sourced git-prompt.sh first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment