Skip to content

Instantly share code, notes, and snippets.

@tmschndr
Created June 7, 2009 13:53
Show Gist options
  • Save tmschndr/125333 to your computer and use it in GitHub Desktop.
Save tmschndr/125333 to your computer and use it in GitHub Desktop.
my lovely bash
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\n<\[\033[0;32m\]\h\[\033[0m\]:\[\033[0;37m\]\u\[\033[0m\]> \! [\$(date +%d.%m.\" \"%H:%M)] \w \[\033[0;36m\]\$(parse_git_branch)\n! "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment