Skip to content

Instantly share code, notes, and snippets.

@wilsonpage
Last active December 27, 2015 15:19
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 wilsonpage/7347087 to your computer and use it in GitHub Desktop.
Save wilsonpage/7347087 to your computer and use it in GitHub Desktop.
Shell prompt with current Git branch. Add this code to a `.profile` file in your home directory for a more useful terminal prompt. You must have bash-completion installed: `$ brew install bash-completion`
function prom {
local GREEN="\[\033[0;32m\]"
local WHITE="\[\033[0m\]"
PS1="\w$GREEN\$(__git_ps1)$WHITE \$ "
}
prom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment