Skip to content

Instantly share code, notes, and snippets.

@wayneeseguin
Forked from dbrady/ps1.bash
Created March 23, 2011 03:03
Show Gist options
  • Save wayneeseguin/882542 to your computer and use it in GitHub Desktop.
Save wayneeseguin/882542 to your computer and use it in GitHub Desktop.
# take 2
export PS1="\D{%H:%M:%S} \[\033[37m\]\u@\h\[\033[32m\]:\w \$( git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\033[36m(\1)/' -e 's/(production)/\\033[1;37m\\033[41m(production)\\033[m/' -e 's/(master)/\\033[1;37m\\033[41m(master)\\033[m/' -e 's/(stage)/\\033[31m(stage)/' -e 's/(next)/\\033[33m(next)/')\[\033[37m\]\[\033[0m\] \n∫ "
# ALARM: production/master RED: stage YELLOW: next CYAN: everybody else
export PS1="\D{%H:%M:%S} \[\033[37m\]\u@\h\[\033[32m\]:\w \$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\033[36m(\1)/' | sed -e 's/(production)/\\033[1;37m\\033[41m(production)\\033[m/' | sed -e 's/(master)/\\033[1;37m\\033[41m(master)\\033[m/' | sed -e 's/(stage)/\\033[31m(stage)/' | sed -e 's/(next)/\\033[33m(next)/')\[\033[37m\]\[\033[0m\] \n∫ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment