Issue #14787 has been reported by aycabta (aycabta .).

----------------------------------------
Feature #14787: Show documents when completion
https://bugs.ruby-lang.org/issues/14787

* Author: aycabta (aycabta .)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
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)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>