Skip to content

Instantly share code, notes, and snippets.

View stefandunca's full-sized avatar

Stefan Dunca stefandunca

View GitHub Profile
@stefandunca
stefandunca / bash-ps1.txt
Last active March 12, 2019 09:43 — forked from gregdeane/bash-ps1.txt
Customize BASH PS1 prompt to show current GIT repository and branch
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
__git_ps1 ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)";