Skip to content

Instantly share code, notes, and snippets.

@kylemclaren
Last active December 21, 2015 22:39
Show Gist options
  • Save kylemclaren/6377117 to your computer and use it in GitHub Desktop.
Save kylemclaren/6377117 to your computer and use it in GitHub Desktop.
This is my current Mac OS X bash profile. It formats the prompt nicely, makes it easy to read and throws in some handy features and a few nice aliases for Homebrew commands.
# ~/.bash_profile
# Git branch in prompt. From https://github.com/jimeh/git-aware-prompt/
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source $GITAWAREPROMPT/main.sh
# Nicely formats prompt. Current directory path, current git branch then "$" on a fresh line
# $git_dirty verifies if changes are commited or not
export PS1="\n\$PWD \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\n\n\[$bldgrn\]$ \[$txtwht\]"
# Ensure Ruby 2.0.0 is used as "system ruby"
export PATH="/usr/local/var/rbenv/versions/2.0.0-p0/bin:$PATH"
# Start rbenv at prompt startup
eval "$(rbenv init -)"
export RBENV_ROOT=/usr/local/var/rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# Some aliases for Homebrew
alias bup='brew update && brew upgrade'
alias bout='brew outdated'
alias bin='brew install'
alias brm='brew uninstall'
alias bls='brew list'
alias bsr='brew search'
alias binf='brew info'
alias bdr='brew doctor'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment