Skip to content

Instantly share code, notes, and snippets.

@Preetam
Created October 12, 2013 17:10
Show Gist options
  • Save Preetam/6952441 to your computer and use it in GitHub Desktop.
Save Preetam/6952441 to your computer and use it in GitHub Desktop.
Inspired by TJ Holowaychuk's PS1
function git_branch {
git rev-parse --abbrev-ref HEAD 2> /dev/null | sed -e 's/\(.*\)/\ \(\1\)/'
}
PS1="\n ∂\[\e[00;30m\] \[\e[0m\]\[\e[00;34m\][\[\e[0m\]\[\e[00;30m\]\W\[\e[0m\]\[\e[00;34m\]]\[\e[0m\]\$(git_branch)\[\e[00;30m\]:\[\e[0m\] "
PS2=" | "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment