init.zsh 1001 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #
  2. # Defines Ruby on Rails aliases.
  3. #
  4. # Authors:
  5. # Robby Russell <robby@planetargon.com>
  6. # Jake Bell <jake.b.bell@gmail.com>
  7. # Sorin Ionescu <sorin.ionescu@gmail.com>
  8. #
  9. # Load dependencies.
  10. pmodload 'ruby'
  11. # Return if requirements are not found.
  12. if (( ! $+commands[bundle] )); then
  13. return 1
  14. fi
  15. #
  16. # Aliases
  17. #
  18. if ! zstyle -t ':prezto:module:rails:alias' skip; then
  19. alias ror='bundle exec rails'
  20. alias rorc='bundle exec rails console'
  21. alias rordc='bundle exec rails dbconsole'
  22. alias rordm='bundle exec rake db:migrate'
  23. alias rordM='bundle exec rake db:migrate db:test:clone'
  24. alias rordr='bundle exec rake db:rollback'
  25. alias rorg='bundle exec rails generate'
  26. alias rorl='tail -f "$(ruby-app-root)/log/development.log"'
  27. alias rorlc='bundle exec rake log:clear'
  28. alias rorp='bundle exec rails plugin'
  29. alias rorr='bundle exec rails runner'
  30. alias rors='bundle exec rails server'
  31. alias rorsd='bundle exec rails server --debugger'
  32. alias rorx='bundle exec rails destroy'
  33. fi