Created
September 8, 2014 20:19
-
-
Save danjohnson3141/f107e47f0084bcb127ad to your computer and use it in GitHub Desktop.
.bash_profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -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