Add the ability to generate local pry-doc indexes #642

davidbalbert opened this Issue Jul 10, 2012 · 4 comments


None yet

4 participants


It would be nice to be able to be able to have core docs from your installed version of ruby, or even from trunk if you compiled from source. Ideas of how it might work:

For the current interpreter:

[1] pry(main)> generate-docs
Generating docs for /Users/david/.rvm/src/ruby-1.9.3-p194...

If the source for the current interpreter can't be found:

[1] pry(main)> generate-docs
Unable to find the source for ruby-1.9.3-p194. Downloading...
--2012-07-10 00:33:26--
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12432239 (12M) [application/x-tar]
Saving to: `/Users/david/.pry/src/ruby-1.9.3-p194.tar.gz'

88% [=================================================>         ] 11,031,953  2.15M/s  eta 3s 

For a particular ruby version:

[1] pry(main)> generate-docs 1.9.2-p320

For a local checkout:

[1] pry(main)> generate-docs ~/Development/ruby
Generating docs for /Users/david/Development/ruby...

Once you have multiple docsets installed, you probably want to be able to switch between them:

[1] pry(main)>  list-docs
     * ruby-1.9.3-p194
    o  ruby-2.0.0dev (/Users/david/Development/ruby)

    * - selected docset
    o - running interpreter

[2] pry(main)>  use-docs ruby-2.0.0dev
[3] pry(main)>  list-docs
    o* ruby-2.0.0dev (/Users/david/Development/ruby)

    * - selected docset
    o - running interpreter

Perhaps this is too pie in the sky, but I think it's worth talking about.


I recommend closing because this feature request is duplicated by show-doc. We should make a separate issue for adding ri output to show-doc if we want to support ruby-core docs.


💯 ruby-core docs would be great @davidbalbert!


Go ahead and close this. I don't think I'll be able to do any work on it :/.

kyrylo commented Feb 27, 2015

It's an interesting idea, and the compelling point is the ability to show docs dynamically (that is, from trunk), but the problem is that for 99% of Pry users it doesn't matter, since they usually work with standard Ruby releases.

I don't see the need of list-docs and use-docs, because normally you care only about the docs of your current Ruby.

PryDoc already solves these problems, except for the generate-docs command, which is indeed a nice feature. If only more users needed this :)

@kyrylo kyrylo closed this Feb 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment