Skip to content

Instantly share code, notes, and snippets.

@danjohnson3141
Created September 8, 2014 20:19
Show Gist options
  • Save danjohnson3141/f107e47f0084bcb127ad to your computer and use it in GitHub Desktop.
Save danjohnson3141/f107e47f0084bcb127ad to your computer and use it in GitHub Desktop.
.bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
alias l='ls -FGlAhp'
alias rake!='rake db:drop && rake db:create'
alias raker!='bin/rake db:migrate RAILS_ENV=test'
function ruby_version() {
rvm current
}
function git_branch() {
branch=$(git branch 2>/dev/null | cut -d' ' -f2)
if [ "$?" == "0" ]; then echo $branch; fi
}
PS1='\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \[\033[01;31m\]($(ruby_version))\[\033[00m\][$(git_branch)]$ '
export EDITOR=nano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment