rails4.plugin.zsh 797 B

123456789101112131415161718192021222324252627282930
  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 rdm='rake db:migrate'
  23. alias rdc='rake db:create'
  24. alias rdr='rake db:rollback'
  25. alias rds='rake db:seed'
  26. alias rlc='rake log:clear'
  27. alias rn='rake notes'
  28. alias rr='rake routes'