Skip to content

Instantly share code, notes, and snippets.

@amadden80
Created December 3, 2013 14:08
Show Gist options
  • Save amadden80/7769671 to your computer and use it in GitHub Desktop.
Save amadden80/7769671 to your computer and use it in GitHub Desktop.
Coloring for .bash_profile
# prompt colors
# "username@hostname:"
PS1="\e[34;01m\u\e[0m@\e[31;01m\h\e[0m:"
# "path/to/where/you/are"
PS1="$PS1\e[32;01m\w\e[0m"
# "(gitbranch)"
PS1="$PS1 \$([[ -n \$(git branch 2> /dev/null) ]] && echo \" \")\[\033[1;33m\]\[\033[1;37m\]\n\$ \[$(tput sgr0)\]"
@lena
Copy link

lena commented Apr 22, 2014

Hi Andrew,
Thanks for the fabulous styling!
On my machine, the (git branch) styling on line 11 didn't work so I wrote a revision at:
https://gist.github.com/kinzin/11197657

Cheers,
Lena

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment