rails4.plugin.zsh 877 B

1234567891011121314151617181920212223242526272829303132
  1. # Rails 4 aliases
  2. function _rails_command () {
  3. if [ -e "script/server" ]; then
  4. ruby script/$@
  5. elif [ -e "script/rails" ]; then
  6. ruby script/rails $@
  7. else
  8. ruby bin/rails $@
  9. fi
  10. }
  11. alias rc='_rails_command console'
  12. alias rd='_rails_command destroy'
  13. alias rdb='_rails_command dbconsole'
  14. alias rdbm='rake db:migrate db:test:clone'
  15. alias rg='_rails_command generate'
  16. alias rgm='_rails_command generate migration'
  17. alias rp='_rails_command plugin'
  18. alias ru='_rails_command runner'
  19. alias rs='_rails_command server'
  20. alias rsd='_rails_command server --debugger'
  21. alias devlog='tail -f log/development.log'
  22. alias testlog='tail -f log/test.log'
  23. alias prodlog='tail -f log/production.log'
  24. alias rdm='rake db:migrate'
  25. alias rdc='rake db:create'
  26. alias rdr='rake db:rollback'
  27. alias rds='rake db:seed'
  28. alias rlc='rake log:clear'
  29. alias rn='rake notes'
  30. alias rr='rake routes'