"Find"ing stuff!
Find is a GREAT tool.
While checking out someone else's rails I could not remember where I had seen a particular path name. So I whipped out my Find work-horse.
find app/views -exec grep -n new_user_registration --with-filenane {} \;
and I get a very nice line that tells me where it is and where it is and what line number it is on:
app/views/layouts/header.html.erb:48: <%= formfor(:user, :url => new_user_registration_path(:format => :json),
Note the format -- the path, followed by the line number, followed by what's on the line, all seperated by colons. I'm sure a Sed or Gawk hacker could use that format to make a command that opens your editor to that file at that line number. I will leave that to you!
Written by Ed Drain
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sed
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#