Skip to content

Instantly share code, notes, and snippets.

@jardix22
Created April 24, 2015 03:35
Show Gist options
  • Save jardix22/249e484c9875dc51812d to your computer and use it in GitHub Desktop.
Save jardix22/249e484c9875dc51812d to your computer and use it in GitHub Desktop.
############################
## TERMINAL CUSTOMIZATION ##
############################
# Function to handle current git branch
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
# Show git branch on underlined path
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \[\033[33m\]$(parse_git_branch)\[\033[01;34m\]$\n\[\033[00m\]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment