Skip to content

Instantly share code, notes, and snippets.

@mfutselaar
Last active December 7, 2021 15:34
Show Gist options
  • Save mfutselaar/6bc4807513806824223c9f9eda2a67dc to your computer and use it in GitHub Desktop.
Save mfutselaar/6bc4807513806824223c9f9eda2a67dc to your computer and use it in GitHub Desktop.
Nice colored bash with git support
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\x1b[93m\1\x1b[97m)/'
}
export PS1="\033[01;32m\]\u@\h\[\033[00m\]:\033[01;34m\]\w\[\033[97m\]\$(parse_git_branch)\[\033[00m\] $ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment