Skip to content

Instantly share code, notes, and snippets.

@lest
Created December 28, 2011 08:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lest/1527176 to your computer and use it in GitHub Desktop.
Save lest/1527176 to your computer and use it in GitHub Desktop.
# rails command
_script_rails() {
local check_dir=$PWD
while [ "$(dirname $check_dir)" != "/" ]; do
if [ -f "$check_dir/script/rails" ]; then
"$check_dir/script/rails" $@
return
fi
check_dir="$(dirname $check_dir)"
done
rails $@
}
alias rails=_script_rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment