Skip to content

Instantly share code, notes, and snippets.

@kryskool
Created March 12, 2012 13:36
Show Gist options
  • Save kryskool/2021962 to your computer and use it in GitHub Desktop.
Save kryskool/2021962 to your computer and use it in GitHub Desktop.
PS1 for Git
BLUE1="\[\033[0;34m\]"
BLUE2="\[\033[1;34m\]"
GREY1="\[\033[0;37m\]"
GREY2="\[\033[1;30m\]"
GREEN1="\[\033[0;32m\]"
GREEN2="\[\033[1;32m\]"
YELLOW1="\[\033[1;33m\]"
RED1="\[\033[0;31m\]"
RED2="\[\033[1;31m\]"
WHITE1="\[\033[1;37m\]"
END="\[\033[0m\]"
PS1="$WHITE1($BLUE2\u$GREY2@$YELLOW1\h$WHITE1)($GREEN2\w$WHITE1) \$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/$WHITE1{\1}$GREY2/') $END"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment