Skip to content

Instantly share code, notes, and snippets.

@observerss
Created November 25, 2012 07:56
Show Gist options
  • Save observerss/4142775 to your computer and use it in GitHub Desktop.
Save observerss/4142775 to your computer and use it in GitHub Desktop.
My Favorite Bash Prompt
PS1="\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[01;31m\]\`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(git:\1)/'\`\[\033[00m\]\$ "
@nevill
Copy link

nevill commented Dec 1, 2012

嗯,这么写比较好,不破坏原来的 PS1

PS,是不是看了我的 $PS1 才想起来这么干的? ^^

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