ruby / ruby/rdoc

ri Should Support Searching by Filename

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
Ruby
Stars
930
Forks
465
Avg merge
3d 10h
Merged PRs (30d)
27

Description

Some libraries like io/console and e.g. the extra methods in date are hard to search for because they don't define their own namespace, and aren't distributed as separate libraries. To assist in finding functionality, ri (and other tools?) should allow the user to search documentation using the file name (which is often the "common name" for the unit of functionality). So, for example:

$ ri io/console   # Maybe a specific switch to force filename lookup?
Located in path/to/io/console

IO
IO#getch
…

The info is already available in the data for the most part (e.g. with ack -u "io/console" $(ri --list-doc-dirs) works for this particular case), just needs to be presentable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ri command's search behavior and inspect how the existing documentation data exposes source filenames, using ri --list-doc-dirs and the io/console example as references. Done means a filename such as io/console can be searched and presents its path and documented entries, with the lookup behavior or switch decided consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.