Last active
March 15, 2019 06:52
-
-
Save bettysteger/5481164 to your computer and use it in GitHub Desktop.
make your terminal beautiful! (git branch color etc)
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
# terminal colors, Git branch in prompt, where am i | |
export CLICOLOR=1 | |
export TERM=xterm-color | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
parse_git_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ →\ \1/' | |
} | |
export PS1='\[\e[1;37m\][\[\e[1;35m\]\u\[\e[1;37m\]:\[\e[1;36m\]\w\[\e[1;33m\]$(parse_git_branch)\[\e[1;37m\]]$ \[\e[0m\]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment