Last active
April 10, 2018 18:26
-
-
Save gustoase/b229ab559cde78da6ccf18475acc0417 to your computer and use it in GitHub Desktop.
Add colors and show git branches in your bash terminal (OSX)
This file contains hidden or 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
# colors | |
PS1='\w\[\033[0;32m\]$( git branch 2> /dev/null | cut -f2 -d\* -s | sed "s/^ / [/" | sed "s/$/]/" )\[\033[0m\] \$ ' | |
# Tell grep to highlight matches | |
export GREP_OPTIONS='--color=auto' | |
# Tell ls to be colourful | |
export CLICOLOR=1 | |
export LSCOLORS=Exfxcxdxbxegedabagacad | |
# You can add those line with vi ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment