Skip to content

Instantly share code, notes, and snippets.

@samuelkobe
Created January 20, 2015 21:16
Show Gist options
  • Save samuelkobe/5ec49165c59442182c50 to your computer and use it in GitHub Desktop.
Save samuelkobe/5ec49165c59442182c50 to your computer and use it in GitHub Desktop.
bash git stuff
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
BLUE="\[\e[1;34m\]"
RED="\[\033[0;31m\]"
LIGHTBLUE="\[\e[0;36m\]"
GREEN="\[\033[0;32m\]"
NO_COLOUR="\[\033[0m\]"
PS1="$GREEN""KOBE$BLUE \w$LIGHTBLUE\$(parse_git_branch) $NO_COLOUR\$ " PATH="/usr/local/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment