Created
June 28, 2019 21:42
-
-
Save atsukoba/369f8afa9bde30ceafce2d4f3b087a2c to your computer and use it in GitHub Desktop.
Git Branch Extention for bash prompt
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
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/' | |
} | |
export PS1="\n\[\e[0;37m\][\#(\!)] \[\e[0;33m\]\t \[\e[0;34m\]\u \[\e[0;37m\]at \[\e[0;31m\]\w\[\e[0;37m\]\[\e[1;37m\]\$(parse_git_branch)\[\e[1;37m\]\n\[\e[0;36m\]--> \[\e[0m\]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment