Last active
December 7, 2021 15:34
-
-
Save mfutselaar/6bc4807513806824223c9f9eda2a67dc to your computer and use it in GitHub Desktop.
Nice colored bash with git support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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