Skip to content

Instantly share code, notes, and snippets.

View jamesejr's full-sized avatar

James Espinosa jamesejr

View GitHub Profile
@jamesejr
jamesejr / .bashrc
Last active December 14, 2015 11:19
Personal .bashrc file with Terminal colors, Homebrew tab completion, and custom Bash/Git prompts
# Add Git branch prompt
function git-current-branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /'
}
# Add custom bash prompt via kirsle.net/wizards/ps1.html
export PS1="\u@macbook \[$(tput setaf 2)\][\W] \[$(tput setaf 1)\]\$(git-current-branch)\[$(tput setaf 7)\]> \[$(tput sgr0)\]"
# Add Git auto completion support
source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash