๐Ÿ“ฆ djberube / rails-zshrc

convenient Rails bindings for zsh

โ˜… 2 stars โ‘‚ 1 forks ๐Ÿ‘ 2 watching
๐Ÿ“ฅ Clone https://github.com/djberube/rails-zshrc.git
HTTPS git clone https://github.com/djberube/rails-zshrc.git
SSH git clone git@github.com:djberube/rails-zshrc.git
CLI gh repo clone djberube/rails-zshrc
djberube_tcf djberube_tcf fix typo in 'r' macro 953e6f0 12 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“„ .zshrc-rails
๐Ÿ“„ README
๐Ÿ“„ README.md

Installation ============

Place .zshrc-rails in your $HOME and place the following line in your .zshrc:

source $HOME/rails-zshrc/.zshrc-rails

Usage =====

You get a few convenient aliases; rss, for example, is the same as ruby script/server, rsc is ruby script/console, and rdb is rake db:migrate.

Additionally, you get an entire class of acronym'd directory changing commands; for example:

cd myrailsapplication rpj

Now you're in myrailsapplication/public/javascript

rav

Now you're in myrailsapplication/app/views

r

Now you're back to myrailsapplication

This lets you quickly traverse your Rails tree. Additionally, there's an rpwd alias that returns the Rails root path, so you can do stuff like this:

vim rpwd/config/environment.rb

The above commands all work anywhere inside of a Rails application; they'll twitch out if used outside of a Rails application, though, and you'll have to kill them with CTRL-C. (I may fix this in a later release, but I don't really have a problem with it.

There are a number of other aliases; rsc is ./script/console, rr is rake routes, rdbm is rake db:migrate, rss is ./script/server, etc. View the file for the complete list. Suggestions and additions are highly appreciated; feel free to email me at djberube@berubeconsulting.com or to message me and/or send pull requests on GitHub. Credits ======= Somebody else originally wrote the directory aliases for BASH; I ported a (modified) version to zsh.