Skip to content

Instantly share code, notes, and snippets.

View dmcquillan314's full-sized avatar

Dan McQuillan dmcquillan314

  • Uber
  • Chicago, IL
View GitHub Profile
@dmcquillan314
dmcquillan314 / bashrc.sh
Created March 17, 2016 14:12
PS1 configuration with version control information
## Print nickname for git/hg/bzr/svn version control in CWD
## Optional $1 of format string for printf, default "(%s) "
if [[ ! -f ~/.git-prompt.sh ]]; then
curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
fi
. ~/.git-prompt.sh
function get_version_ctl_branch() {
local dir="$PWD"