Consider letting help fall back to RI documentation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the IRB help and show_doc entry points, then inspect how ShowDoc uses RDoc::RI::Driver. Resolve whether help should redirect users to show_doc or display RI documentation directly; done means the chosen behavior is implemented and covered by tests.
Written by the indexing model from the issue text.
Description
I noticed that:
irb> help Array
Can't find command `Array`. Please check the command name and try again.
even though IRB can already look up the same documentation with:
irb> show_doc Array
I dug into ShowDoc a bit and saw that it uses RDoc::RI::Driver, so it seems like help could potentially make use of the same functionality.
I'm wondering if it would make sense for help to fall back to RI when the requested name isn't an IRB command.
There seem to be two reasonable ways to handle this:
help Array could tell the user to use show_doc Array.
help Array could just display the RI documentation directly, effectively making help a more general entry point for both IRB commands and Ruby documentation.
The second option seems particularly convenient, but I wasn't sure which behavior would fit better with IRB's intended interface.
Would either of these be desirable? If so, I'd be interested in taking a shot at implementing it.
- Dominant language
- Ruby
- Stars
- 477
- Forks
- 159
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/irb
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Proposal: public hook for external documentation providers in show_doc and the completion doc dialogOpen
Difficulty 5/5 Over a week Newbie friendliness 38/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
ds-drift
Difficulty 1/5 Under an hour Newbie friendliness 88/100
we-promise/sure#3934 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
hanami/hanami-view#287 · 3 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day