Skip to content

Instantly share code, notes, and snippets.

@deadbits
Forked from codian/gist:2069206
Created March 18, 2012 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deadbits/2069269 to your computer and use it in GitHub Desktop.
Save deadbits/2069269 to your computer and use it in GitHub Desktop.
current git branch name on prompt
export PS1="\[\033[34m\]\w\[\033[35m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.split(/\n/).grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1)')\"\`\[\033[00m\]> "
@deadbits
Copy link
Author

forked so i can edit this later. pure awesome.

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