Created
January 9, 2018 18:47
-
-
Save pavelbinar/6b2ba9e0d6fd3f0db647ef0eee8f21d0 to your computer and use it in GitHub Desktop.
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 color_my_prompt { | |
local __user_and_location="\n\[\e[32;1m\](\[\e[37;1m\]\u\[\e[32;1m\])-(\[\e[37;1m\]\w\[\e[32;1m\])" | |
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`' | |
local __prompt="\n$\[\e[0m\]" | |
export PS1="$__user_and_location $__git_branch $__prompt " | |
} | |
color_my_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment