1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-11-20 07:31:11 +00:00
prezto/modules/rails/init.zsh

34 lines
798 B
Bash
Raw Normal View History

2012-02-01 04:37:51 +00:00
#
# Defines Ruby on Rails aliases.
#
# Authors:
# Robby Russell <robby@planetargon.com>
# Jake Bell <jake.b.bell@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
2012-06-14 23:05:12 +00:00
# Aliases (Compatible with Rails 2)
2011-08-31 03:16:15 +00:00
alias rc='_rails-command console'
2012-06-14 23:05:12 +00:00
alias rdc='_rails-command dbconsole'
alias rdm='rake db:migrate'
alias rdM='rake db:migrate db:test:clone'
alias rdr='rake db:rollback'
2011-08-31 03:16:15 +00:00
alias rg='_rails-command generate'
2012-06-14 23:05:12 +00:00
alias rl='tail -f log/development.log'
alias rlc='rake log:clear'
2011-08-31 03:16:15 +00:00
alias rp='_rails-command plugin'
2011-12-28 16:21:18 +00:00
alias rr='_rails-command runner'
2011-08-31 03:16:15 +00:00
alias rs='_rails-command server'
alias rsd='_rails-command server --debugger'
2012-06-14 23:05:12 +00:00
alias rx='_rails-command destroy'
2011-08-31 03:16:15 +00:00
# Functions
function _rails-command {
2011-08-31 03:16:15 +00:00
if [[ -e "script/server" ]]; then
ruby script/"$@"
else
ruby script/rails "$@"
fi
}
2011-08-31 03:16:15 +00:00