idl3 / rails_root

A script to easily traverse back to the root directory of a Rails/Sinatra application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails_Root

A script to easily traverse back to the root directory of a Rails/Sinatra application

Installation

Just configure your project folder in the script

project_folder = "/Users/idle/Projects"

Then reference this in your bash script alias. E.g.

alias .r='`ruby ~/.rails_root.rb`'

Usage

Just type your binded alias within any part of the project directory and you will be taken back to the rails root E.g

/Users/idle/Projects/rails_root/sub_directory/another_subdirectory/ > .r
/Users/idle/Projects/rails_root/ > _

About

A script to easily traverse back to the root directory of a Rails/Sinatra application

License:MIT License


Languages

Language:Ruby 100.0%