Skip to content

Instantly share code, notes, and snippets.

@bettysteger
Last active March 15, 2019 06:52
Show Gist options
  • Save bettysteger/5481164 to your computer and use it in GitHub Desktop.
Save bettysteger/5481164 to your computer and use it in GitHub Desktop.
make your terminal beautiful! (git branch color etc)
# 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