Skip to content

Instantly share code, notes, and snippets.

@iMartyn
Created June 16, 2016 16:09
Show Gist options
  • Save iMartyn/07d93bc2f018f9406beaef89f5230de6 to your computer and use it in GitHub Desktop.
Save iMartyn/07d93bc2f018f9406beaef89f5230de6 to your computer and use it in GitHub Desktop.
# Put in your .bashrc :
#Include branch in prompt
__git_ps1 ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)";
if [ -n "$b" ]; then
printf " (%s)" "${b##refs/heads/}";
fi
}
function proml
{
PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\$( __git_ps1 ) \$\[\033[00m\] "
PS2='> '
PS4='+ '
}
proml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment