Jake Worth

Silver Searcher RDoc Support

October 31, 20151 min read

Today I submitted my first pull request to The Silver Searcher project:


Silver Searcher can be installed on OSX with Homebrew and is a fantastic command line search tool. Here’s a search I wrote recently to hunt down Ruby getter methods:

$ ag 'def (\w+);?\s+@\1;?\s+end'

ag … for Silver. And it’s a search tool. Get it?

My pull request adds support for the RDoc file extension, which is common in many Ruby projects, including Rails. If it gets merged, the following search will be scoped only to RDoc files.

$ ag 'foo' --rdoc

This pull request allowed me to write and test in C, something I’ve never done before. I hope that this feature will allow programmers and OSS contributors to more easily navigate documentation from the command line. In a large project like Rails, a flag that can cut through the noise should be helpful.

Update (November 12, 2015)

This pull request was merged; Silver Searcher now accepts --rdoc as a filter flag.

Each week, I write an email about React. It's a collection of quotes, news, conference talks, and documentation curated be me to help you get up to speed on this exploding ecosystem. Join my subscribers today by subscribing to React Explained.

Jake Worth

I'm Jake Worth, a web developer. Home About Now Newsletter