Project

General

Profile

Actions

Feature #14787

closed

Show documents when completion

Added by aycabta (aycabta .) almost 6 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:87261]

Description

The "irb/completion" provides completion for classes, modules, symbols, and methods. This patch provides a new feature for it that shows documents when press TAB key one more after exact matches. This uses RDoc as a library.

Example:

$ ruby -Ilib bin/irb 
irb(main):001:0> "".gsub # press TAB key twice
"".gsub   "".gsub!
irb(main):001:0> "".gsub # press TAB key one more
# show RI document and press q to quit
irb(main):001:0> "".gsub

I'm the RDoc maintainer. A lot of Ruby users tell me "I'm using Google for reading documents of Ruby".

RDoc installs all documents to Ruby's directory by default. Many users never use it because it's just for RI("ri" command). I think that it is a reason of that many users don't attach importance to documentation.

Perl has "perldoc" feature and users easily access documents of modules by "perldoc" command. Python has "docstring" feature and users can access it on REPL. Those are each language's design of importance. Users use the language on the documentation design, so library developers write documents on the documentation design. Ruby doesn't have documentation design like Perl and Python. Ruby just has RDoc, IRB, and any other supports, but these are just fragmented features, these are not a documentation design.

Ruby needs many new features of documentation. This is one of them. This new feature gives new development environment.


Files

show_doc_when_completion.patch (8.9 KB) show_doc_when_completion.patch aycabta (aycabta .), 05/25/2018 07:43 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0