Skip to content

Instantly share code, notes, and snippets.

@rachelmyers
Created February 24, 2016 21:38
Show Gist options
  • Save rachelmyers/fb33be824a340deea113 to your computer and use it in GitHub Desktop.
Save rachelmyers/fb33be824a340deea113 to your computer and use it in GitHub Desktop.
.bash_profile
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# general path munging
export PATH=${PATH}:~/bin
export PATH=${PATH}:/usr/local/bin
#export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PS1="🌈 \e[35m\u \e[33m[\w]\e[0m\$(parse_git_branch) 🦄 \n > "
export EDITOR=vim
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias be='bundle exec'
alias dc='cd'
alias ga='git add'
alias gd='git diff'
alias gdc='git diff --cached'
alias gs='git status'
alias gc='git commit -v'
alias gvim='open -a MacVim '
alias pair='ruby ~/src/pairing_script.rb'
alias unpair='pair'
alias r='rails'
alias rdm='bin/rake db:migrate'
alias rdmp='bin/rake db:migrate db:test:prepare'
alias t='bin/testrb'
alias prep='bin/rake db:test:prepare'
alias unstage='git reset HEAD'
# enable color output for "ls"
if [ -x /usr/bin/dircolors ]; then
eval "`dircolors -b 2> /dev/null`"
fi
if [ -x /usr/bin/dircolors ] || [[ -f ~/.dir_colors ]]; then
# make "ls" output color by default
alias ls='ls -G'
# make grep and variants output color by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment