From 0997210deb64f145e20e4c87706e42cfaefa7837 Mon Sep 17 00:00:00 2001 From: yugui Date: Mon, 29 Dec 2008 12:14:25 +0000 Subject: [PATCH 01/13] * man/ri.1: new manpage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 man/ri.1 diff --git a/man/ri.1 b/man/ri.1 new file mode 100644 index 0000000000..f414adb559 --- /dev/null +++ b/man/ri.1 @@ -0,0 +1,180 @@ +.\"Ruby is copyrighted by Yukihiro Matsumoto . +.Dd December 29, 2008 +.Dt RI(1) "" "Ruby Programmers Reference Guide" +.Os UNIX +.Sh NAME +.Nm ri +.Nd Ruby API reference front end +.Sh SYNOPSIS +.Nm +.Op Fl Ti +.Op Fl d Ar directory +.Op Fl f Ar format +.Op Fl -list-doc-dirs +.Op Fl -no-standard-docs +.Op Fl - Ns Oo Cm no- Oc Ns Cm Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc +.Op Fl - Ns Oo Cm no- Oc Ns Cm use-cache +.Op Fl -width Ns = Ns Ar width +.Op Ar target ... +.Sh DESCRIPTION +.Nm +is a CUI front end for the Ruby API reference. +You can search and read API reference for classes and methods with +.Nm . + +.Nm +is a part of Ruby. + +.Ar target +can be one of the following forms: +.Bl -diag -offset indent +.It Class +for classes +.It Class::method +for class methods +.It Class#method +for instance methods +.It Class.method +for both class and instance methods +.It method +for both class and instance methods +.El + +All class names may be abbreviated to their minimum unambiguous form. If a name +is ambiguous, all valid options will be listed. + +For example: +.Bd -literal -offset indent +ri Fil +ri File +ri File.new +ri zip +.Ed + +Note that shell quoting may be required for method names containing +punctuation: +.Bd -literal -offset indent +ri 'Array.[]' +ri compact\! +.Ed +.Sh OPTIONS +.Bl -tag -width "1234567890123" -compact +.Pp +.It Fl -version +Prints the version of +.Nm . +.Pp +.It Fl T +.It Fl -no-pager +Send output directly to stdout, rather than to a pager. +.Pp +.It Fl d Ar directory +.It Fl -doc-dir Ns = Ns Ar directory +List of directories from which to source documentation in addition to the standard +directories. May be repeated. +.Pp +.It Fl f Ar FORMAT +.It Fl -fmt Ar FORMAT +.It Fl -format Ns = Ns FORMAT +Format to use when displaying output: +.Dd ansi, bs, html, plain, simple +.Pp +Use 'bs' (backspace) with most pager programs. To use ANSI, either disable the +pager or tell the pager to allow control characters. +.Pp +.It Fl i +.It Fl -interactive +This makes +.Nm +go into interactive mode. +.Pp +When +.Nm +is in interactive mode it will allow the user to disambiguate lists of +methods in case multiple methods match against a method search string. It also +will allow the user to enter in a method name (with auto-completion, if readline +is supported) when viewing a class. +.Pp +.It Fl -list-doc-dirs +List the directories from which ri will source documentation on stdout and exit. +.Pp +.It Fl -no-standard-docs +Do not include documentation from the Ruby standard library, +.Pa site_lib , +installed gems, or +.Pa ~/.rdoc . + +Equivalent to specifying the options +.Fl -no-system , Fl -no-site , Fl -no-gems , +and +.Fl -no-home . +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm system +Include documentation from Ruby's standard library. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm site + Include documentation from libraries installed in site_lib. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm gems +Include documentation from RubyGems. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm home +Include documentation stored in ~/.rdoc. Defaults to true. +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm use-cache +Whether or not to use +.Nm Ns +.Ns 's cache. True by default. +.Pp +.It Fl w Ar width +.It Fl -width Ns = Ns Ar width +Set the width of the output. +.Pp +.El +.Pp +.Sh ENVIRONMENT +.Bl -tag -width "USERPROFILE" -compact +.Pp +.It Ev RI +Additional options. +.Pp +.It Ev PAGER +Used as the name of pager program for displaying. +.Pp +.It Ev HOME +.It Ev USERPROFILE +.It Ev HOMEPATH +Path to user's home directory. +.El +.Pp +.Sh FILES +.Bl -tag -width "USERPROFILE" -compact +.Pp +.It Pa ~/.ri +Caches recently referenced documents here. +.Pp +.It Pa ~/.rdoc +Searches user-wide documents here. +.Pp +.El +.Pp +.Sh SEE ALSO +.Xr ruby 1 +.Xr rdoc 1 +.Xr gem 1 +.Pp +.Sh REPORTING BUGS +.Bl -bullet +.Li Security vulnerabilities should be reported via an email to +.Aq security@ruby-lang.org Ns +.Li . +Reported problems will be published after fixed. +.Pp +.Li And you can report other bugs and feature requests via the +Ruby Issue Tracking System (http://redmine.ruby-lang.org). +Do not report security vulnerabilities +via the system because it publishes the vulnerabilities immedately. +.El +.Sh AUTHORS +Written by Dave Thomas +.Aq dave@pragmaticprogrammer.com From 4a6a9dc8206c5999cf4dfeb861293dcb7773d8ad Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 26 Oct 2009 06:44:31 +0000 Subject: [PATCH 02/13] * man/*.1: suppressed warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/man/ri.1 b/man/ri.1 index f414adb559..baced73528 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -4,7 +4,7 @@ .Os UNIX .Sh NAME .Nm ri -.Nd Ruby API reference front end +.Nd Ruby API reference front end .Sh SYNOPSIS .Nm .Op Fl Ti @@ -12,19 +12,19 @@ .Op Fl f Ar format .Op Fl -list-doc-dirs .Op Fl -no-standard-docs -.Op Fl - Ns Oo Cm no- Oc Ns Cm Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc +.Op Fl - Ns Oo Cm no- Oc Ns Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc .Op Fl - Ns Oo Cm no- Oc Ns Cm use-cache .Op Fl -width Ns = Ns Ar width .Op Ar target ... .Sh DESCRIPTION .Nm -is a CUI front end for the Ruby API reference. +is a CUI front end for the Ruby API reference. You can search and read API reference for classes and methods with .Nm . - +.Pp .Nm is a part of Ruby. - +.Pp .Ar target can be one of the following forms: .Bl -diag -offset indent @@ -39,10 +39,10 @@ for both class and instance methods .It method for both class and instance methods .El - +.Pp All class names may be abbreviated to their minimum unambiguous form. If a name is ambiguous, all valid options will be listed. - +.Pp For example: .Bd -literal -offset indent ri Fil @@ -50,7 +50,7 @@ ri File ri File.new ri zip .Ed - +.Pp Note that shell quoting may be required for method names containing punctuation: .Bd -literal -offset indent @@ -61,7 +61,7 @@ ri compact\! .Bl -tag -width "1234567890123" -compact .Pp .It Fl -version -Prints the version of +Prints the version of .Nm . .Pp .It Fl T @@ -84,7 +84,7 @@ pager or tell the pager to allow control characters. .Pp .It Fl i .It Fl -interactive -This makes +This makes .Nm go into interactive mode. .Pp @@ -103,8 +103,8 @@ Do not include documentation from the Ruby standard library, .Pa site_lib , installed gems, or .Pa ~/.rdoc . - -Equivalent to specifying the options +.Pp +Equivalent to specifying the options .Fl -no-system , Fl -no-site , Fl -no-gems , and .Fl -no-home . @@ -122,7 +122,7 @@ Include documentation from RubyGems. Defaults to true. Include documentation stored in ~/.rdoc. Defaults to true. .Pp .It Fl - Ns Oo Cm no- Oc Ns Cm use-cache -Whether or not to use +Whether or not to use .Nm Ns .Ns 's cache. True by default. .Pp @@ -165,7 +165,7 @@ Searches user-wide documents here. .Pp .Sh REPORTING BUGS .Bl -bullet -.Li Security vulnerabilities should be reported via an email to +.Li Security vulnerabilities should be reported via an email to .Aq security@ruby-lang.org Ns .Li . Reported problems will be published after fixed. From 5df94a5acb0e0bcf3e026973a11bc690b424c12c Mon Sep 17 00:00:00 2001 From: kazu Date: Wed, 1 Dec 2010 11:07:03 +0000 Subject: [PATCH 03/13] fix typos in man git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/ri.1 b/man/ri.1 index baced73528..ee3463a1a9 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -173,7 +173,7 @@ Reported problems will be published after fixed. .Li And you can report other bugs and feature requests via the Ruby Issue Tracking System (http://redmine.ruby-lang.org). Do not report security vulnerabilities -via the system because it publishes the vulnerabilities immedately. +via the system because it publishes the vulnerabilities immediately. .El .Sh AUTHORS Written by Dave Thomas From 247d5b8f45abc4daf70a678182bc07f09aaeb1cf Mon Sep 17 00:00:00 2001 From: drbrain Date: Mon, 19 Dec 2011 21:07:09 +0000 Subject: [PATCH 04/13] * README.ja: Update redmine.ruby-lang.org to bugs.ruby-lang.org * README: ditto * common.mk: ditto * ext/bigdecimal/README: ditto * man/erb.1: ditto * man/irb.1: ditto * man/ri.1: ditto * man/ruby.1: ditto * man/ruby.1: ditto * sparc.c: ditto * tool/install-sh: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/ri.1 b/man/ri.1 index ee3463a1a9..3225c4bed5 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -171,7 +171,7 @@ Searches user-wide documents here. Reported problems will be published after fixed. .Pp .Li And you can report other bugs and feature requests via the -Ruby Issue Tracking System (http://redmine.ruby-lang.org). +Ruby Issue Tracking System (http://bugs.ruby-lang.org). Do not report security vulnerabilities via the system because it publishes the vulnerabilities immediately. .El From 6ad9f0a24fe0e6c612dcc23e231edb3f8f6d2d47 Mon Sep 17 00:00:00 2001 From: zzak Date: Thu, 15 Nov 2012 04:22:44 +0000 Subject: [PATCH 05/13] * man/erb.1: Fix grammar and copyright dates * man/goruby.1: ditto * man/irb.1: ditto * man/rake.1: ditto * man/ri.1: ditto * man/ruby.1: ditto Patch by Arthur Gunn [Fixes Github #210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/ri.1 b/man/ri.1 index 3225c4bed5..5c467b32df 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -1,5 +1,5 @@ .\"Ruby is copyrighted by Yukihiro Matsumoto . -.Dd December 29, 2008 +.Dd November 7, 2012 .Dt RI(1) "" "Ruby Programmers Reference Guide" .Os UNIX .Sh NAME @@ -18,7 +18,7 @@ .Op Ar target ... .Sh DESCRIPTION .Nm -is a CUI front end for the Ruby API reference. +is a CLI front end for the Ruby API reference. You can search and read API reference for classes and methods with .Nm . .Pp @@ -168,7 +168,7 @@ Searches user-wide documents here. .Li Security vulnerabilities should be reported via an email to .Aq security@ruby-lang.org Ns .Li . -Reported problems will be published after fixed. +Reported problems will be published after being fixed. .Pp .Li And you can report other bugs and feature requests via the Ruby Issue Tracking System (http://bugs.ruby-lang.org). From 20662c2d12b355efc596d541404cf5e4d3811495 Mon Sep 17 00:00:00 2001 From: zzak Date: Wed, 10 Jul 2013 15:55:12 +0000 Subject: [PATCH 06/13] * man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/ri.1 b/man/ri.1 index 5c467b32df..cadf4b8e16 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -77,7 +77,8 @@ directories. May be repeated. .It Fl -fmt Ar FORMAT .It Fl -format Ns = Ns FORMAT Format to use when displaying output: -.Dd ansi, bs, html, plain, simple +.Pp +ansi, bs, html, plain, simple .Pp Use 'bs' (backspace) with most pager programs. To use ANSI, either disable the pager or tell the pager to allow control characters. From f8969b990eb390d629db3baddfbe66de91092811 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 23 May 2015 09:38:49 +0000 Subject: [PATCH 07/13] man: updated * man/*.1: updated dates in man pages. [ruby-dev:48988] [Bug #11171] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/ri.1 b/man/ri.1 index cadf4b8e16..bf4efb1ac3 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -1,5 +1,5 @@ .\"Ruby is copyrighted by Yukihiro Matsumoto . -.Dd November 7, 2012 +.Dd July 10, 2013 .Dt RI(1) "" "Ruby Programmers Reference Guide" .Os UNIX .Sh NAME From 948282bd6e4c86d73026b5993111fe336cd79443 Mon Sep 17 00:00:00 2001 From: kazu Date: Sun, 11 Sep 2016 10:33:36 +0000 Subject: [PATCH 08/13] Use https instead of http in some URLs git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/ri.1 b/man/ri.1 index bf4efb1ac3..df55746162 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -172,7 +172,7 @@ Searches user-wide documents here. Reported problems will be published after being fixed. .Pp .Li And you can report other bugs and feature requests via the -Ruby Issue Tracking System (http://bugs.ruby-lang.org). +Ruby Issue Tracking System (https://bugs.ruby-lang.org). Do not report security vulnerabilities via the system because it publishes the vulnerabilities immediately. .El From 1f83925b1cf78c25d9fdaaf936783dc2e4a7df77 Mon Sep 17 00:00:00 2001 From: knu Date: Fri, 23 Sep 2016 11:21:52 +0000 Subject: [PATCH 09/13] Use the `Lk` macro for hyperlinks * man/ruby.1, man/erb.1, man/irb.1, man/ri.1: Use the `Lk` macro for hyperlinks, which has been available since mdocml 1.5.1 (released more than seven years ago). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/ri.1 b/man/ri.1 index df55746162..0aeb7bca40 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -172,7 +172,8 @@ Searches user-wide documents here. Reported problems will be published after being fixed. .Pp .Li And you can report other bugs and feature requests via the -Ruby Issue Tracking System (https://bugs.ruby-lang.org). +Ruby Issue Tracking System +.Pq Lk https://bugs.ruby-lang.org/ . Do not report security vulnerabilities via the system because it publishes the vulnerabilities immediately. .El From 088c93801dcf1dff4de7f4299d32225eef9628bd Mon Sep 17 00:00:00 2001 From: knu Date: Mon, 26 Sep 2016 12:39:18 +0000 Subject: [PATCH 10/13] Remove Ns before puctuation * man/erb.1, man/irb.1, man/ri.1, man/ruby.1: Remove Ns before puctuation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/man/ri.1 b/man/ri.1 index 0aeb7bca40..01a37a3a1f 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -167,8 +167,7 @@ Searches user-wide documents here. .Sh REPORTING BUGS .Bl -bullet .Li Security vulnerabilities should be reported via an email to -.Aq security@ruby-lang.org Ns -.Li . +.Aq security@ruby-lang.org . Reported problems will be published after being fixed. .Pp .Li And you can report other bugs and feature requests via the From b619c799f56d0381e471b93a49402b27548433e5 Mon Sep 17 00:00:00 2001 From: stomar Date: Thu, 20 Apr 2017 07:44:01 +0000 Subject: [PATCH 11/13] ri.1: fix errors in ri man page * man/ri.1: fix some errors in ri man page (add missing options, remove options that do not exist, fix formatter list). Reported by Josh Cheek. [ruby-core:68065] [Bug #10838] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/man/ri.1 b/man/ri.1 index 01a37a3a1f..56687377f4 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -7,14 +7,14 @@ .Nd Ruby API reference front end .Sh SYNOPSIS .Nm -.Op Fl Ti +.Op Fl alTi .Op Fl d Ar directory .Op Fl f Ar format -.Op Fl -list-doc-dirs +.Op Fl w Ar width +.Op Fl -server Ns [= Ns Ar PORT Ns ] .Op Fl -no-standard-docs +.Op Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs .Op Fl - Ns Oo Cm no- Oc Ns Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc -.Op Fl - Ns Oo Cm no- Oc Ns Cm use-cache -.Op Fl -width Ns = Ns Ar width .Op Ar target ... .Sh DESCRIPTION .Nm @@ -60,9 +60,22 @@ ri compact\! .Sh OPTIONS .Bl -tag -width "1234567890123" -compact .Pp +.It Fl -help +Show help and exit. +.Pp +.It Fl v .It Fl -version -Prints the version of -.Nm . +Output version information and exit. +.Pp +.It Fl a +.It Fl - Ns Oo Cm no- Oc Ns Cm all +Show all documentation for a class or module. +.Pp +.It Fl l +.It Fl - Ns Oo Cm no- Oc Ns Cm list +List classes +.Nm +knows about. .Pp .It Fl T .It Fl -no-pager @@ -73,18 +86,20 @@ Send output directly to stdout, rather than to a pager. List of directories from which to source documentation in addition to the standard directories. May be repeated. .Pp +.It Fl -server Ns [= Ns Ar PORT Ns ] +Run RDoc server on the given port. The default port is 8214. +.Pp .It Fl f Ar FORMAT -.It Fl -fmt Ar FORMAT .It Fl -format Ns = Ns FORMAT Format to use when displaying output: .Pp -ansi, bs, html, plain, simple +ansi, bs, markdown, rdoc .Pp Use 'bs' (backspace) with most pager programs. To use ANSI, either disable the pager or tell the pager to allow control characters. .Pp .It Fl i -.It Fl -interactive +.It Fl - Ns Oo Cm no- Oc Ns Cm interactive This makes .Nm go into interactive mode. @@ -96,7 +111,7 @@ methods in case multiple methods match against a method search string. It also will allow the user to enter in a method name (with auto-completion, if readline is supported) when viewing a class. .Pp -.It Fl -list-doc-dirs +.It Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs List the directories from which ri will source documentation on stdout and exit. .Pp .It Fl -no-standard-docs @@ -122,11 +137,6 @@ Include documentation from RubyGems. Defaults to true. .It Fl - Ns Oo Cm no- Oc Ns Cm home Include documentation stored in ~/.rdoc. Defaults to true. .Pp -.It Fl - Ns Oo Cm no- Oc Ns Cm use-cache -Whether or not to use -.Nm Ns -.Ns 's cache. True by default. -.Pp .It Fl w Ar width .It Fl -width Ns = Ns Ar width Set the width of the output. From 4b7727c6b74a0fbd9159c737b8e914ed22982a77 Mon Sep 17 00:00:00 2001 From: stomar Date: Thu, 20 Apr 2017 07:44:54 +0000 Subject: [PATCH 12/13] ri.1: rewrite ri man page * man/ri.1: update the (very outdated) ri man page: * update document date * fix document title formatting and volume name * update descriptions and options to current ri --help text * fix some mdoc formatting errors (missing escaping of `\', wrong macro for bullet list items) * various rewordings and other improvements git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- man/ri.1 | 228 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 142 insertions(+), 86 deletions(-) diff --git a/man/ri.1 b/man/ri.1 index 56687377f4..85a6dfcd53 100644 --- a/man/ri.1 +++ b/man/ri.1 @@ -1,47 +1,56 @@ .\"Ruby is copyrighted by Yukihiro Matsumoto . -.Dd July 10, 2013 -.Dt RI(1) "" "Ruby Programmers Reference Guide" +.Dd April 20, 2017 +.Dt RI \&1 "Ruby Programmer's Reference Guide" .Os UNIX .Sh NAME .Nm ri .Nd Ruby API reference front end .Sh SYNOPSIS .Nm -.Op Fl alTi -.Op Fl d Ar directory -.Op Fl f Ar format -.Op Fl w Ar width -.Op Fl -server Ns [= Ns Ar PORT Ns ] -.Op Fl -no-standard-docs +.Op Fl ahilTv +.Op Fl d Ar DIRNAME +.Op Fl f Ar FORMAT +.Op Fl w Ar WIDTH +.Op Fl - Ns Oo Cm no- Oc Ns Cm pager +.Op Fl -server Ns Oo = Ns Ar PORT Oc .Op Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs +.Op Fl -no-standard-docs .Op Fl - Ns Oo Cm no- Oc Ns Bro Cm system Ns | Ns Cm site Ns | Ns Cm gems Ns | Ns Cm home Brc -.Op Ar target ... +.Op Fl - Ns Oo Cm no- Oc Ns Cm profile +.Op Fl -dump Ns = Ns Ar CACHE +.Op Ar name ... .Sh DESCRIPTION .Nm -is a CLI front end for the Ruby API reference. -You can search and read API reference for classes and methods with +is a command-line front end for the Ruby API reference. +You can search and read the API reference for classes and methods with .Nm . .Pp .Nm is a part of Ruby. .Pp -.Ar target -can be one of the following forms: +.Ar name +can be: .Bl -diag -offset indent -.It Class -for classes -.It Class::method -for class methods -.It Class#method -for instance methods -.It Class.method -for both class and instance methods -.It method -for both class and instance methods +.It Class | Module | Module::Class +.Pp +.It Class::method | Class#method | Class.method | method +.Pp +.It gem_name: | gem_name:README | gem_name:History .El .Pp -All class names may be abbreviated to their minimum unambiguous form. If a name -is ambiguous, all valid options will be listed. +All class names may be abbreviated to their minimum unambiguous form. +If a name is ambiguous, all valid options will be listed. +.Pp +A +.Ql \&. +matches either class or instance methods, while #method +matches only instance and ::method matches only class methods. +.Pp +README and other files may be displayed by prefixing them with the gem name +they're contained in. If the gem name is followed by a +.Ql \&: +all files in the gem will be shown. +The file name extension may be omitted where it is unambiguous. .Pp For example: .Bd -literal -offset indent @@ -49,23 +58,51 @@ ri Fil ri File ri File.new ri zip +ri rdoc:README .Ed .Pp -Note that shell quoting may be required for method names containing -punctuation: +Note that shell quoting or escaping may be required for method names +containing punctuation: .Bd -literal -offset indent ri 'Array.[]' -ri compact\! +ri compact\e! .Ed +.Pp +To see the default directories +.Nm +will search, run: +.Bd -literal -offset indent +ri --list-doc-dirs +.Ed +.Pp +Specifying the +.Fl -system , Fl -site , Fl -home , Fl -gems , +or +.Fl -doc-dir +options will limit +.Nm +to searching only the specified directories. +.Pp +.Nm +options may be set in the +.Ev RI +environment variable. +.Pp +The +.Nm +pager can be set with the +.Ev RI_PAGER +environment variable or the +.Ev PAGER +environment variable. +.Pp .Sh OPTIONS .Bl -tag -width "1234567890123" -compact .Pp -.It Fl -help -Show help and exit. -.Pp -.It Fl v -.It Fl -version -Output version information and exit. +.It Fl i +.It Fl - Ns Oo Cm no- Oc Ns Cm interactive +In interactive mode you can repeatedly +look up methods with autocomplete. .Pp .It Fl a .It Fl - Ns Oo Cm no- Oc Ns Cm all @@ -77,115 +114,134 @@ List classes .Nm knows about. .Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm pager +Send output to a pager, +rather than directly to stdout. +.Pp .It Fl T -.It Fl -no-pager -Send output directly to stdout, rather than to a pager. +Synonym for +.Fl -no-pager . .Pp -.It Fl d Ar directory -.It Fl -doc-dir Ns = Ns Ar directory -List of directories from which to source documentation in addition to the standard -directories. May be repeated. +.It Fl w Ar WIDTH +.It Fl -width Ns = Ns Ar WIDTH +Set the width of the output. .Pp -.It Fl -server Ns [= Ns Ar PORT Ns ] -Run RDoc server on the given port. The default port is 8214. +.It Fl -server Ns Oo = Ns Ar PORT Oc +Run RDoc server on the given port. +The default port is\~8214. .Pp .It Fl f Ar FORMAT -.It Fl -format Ns = Ns FORMAT -Format to use when displaying output: -.Pp -ansi, bs, markdown, rdoc +.It Fl -format Ns = Ns Ar FORMAT +Use the selected formatter. +The default formatter is +.Li bs +for paged output and +.Li ansi +otherwise. +Valid formatters are: +.Li ansi , Li bs , Li markdown , Li rdoc . +.Pp +.It Fl h +.It Fl -help +Show help and exit. .Pp -Use 'bs' (backspace) with most pager programs. To use ANSI, either disable the -pager or tell the pager to allow control characters. +.It Fl v +.It Fl -version +Output version information and exit. +.El .Pp -.It Fl i -.It Fl - Ns Oo Cm no- Oc Ns Cm interactive -This makes -.Nm -go into interactive mode. +Data source options: +.Bl -tag -width "1234567890123" -compact .Pp -When +.It Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs +List the directories from which .Nm -is in interactive mode it will allow the user to disambiguate lists of -methods in case multiple methods match against a method search string. It also -will allow the user to enter in a method name (with auto-completion, if readline -is supported) when viewing a class. +will source documentation on stdout and exit. .Pp -.It Fl - Ns Oo Cm no- Oc Ns Cm list-doc-dirs -List the directories from which ri will source documentation on stdout and exit. +.It Fl d Ar DIRNAME +.It Fl -doc-dir Ns = Ns Ar DIRNAME +List of directories from which to source +documentation in addition to the standard +directories. May be repeated. .Pp .It Fl -no-standard-docs Do not include documentation from the Ruby standard library, .Pa site_lib , installed gems, or .Pa ~/.rdoc . -.Pp -Equivalent to specifying the options -.Fl -no-system , Fl -no-site , Fl -no-gems , -and -.Fl -no-home . +Use with +.Fl -doc-dir . .Pp .It Fl - Ns Oo Cm no- Oc Ns Cm system Include documentation from Ruby's standard library. Defaults to true. .Pp .It Fl - Ns Oo Cm no- Oc Ns Cm site - Include documentation from libraries installed in site_lib. Defaults to true. +Include documentation from libraries installed in +.Pa site_lib . +Defaults to true. .Pp .It Fl - Ns Oo Cm no- Oc Ns Cm gems -Include documentation from RubyGems. Defaults to true. +Include documentation from RubyGems. Defaults to true. .Pp .It Fl - Ns Oo Cm no- Oc Ns Cm home -Include documentation stored in ~/.rdoc. Defaults to true. +Include documentation stored in +.Pa ~/.rdoc . +Defaults to true. +.El .Pp -.It Fl w Ar width -.It Fl -width Ns = Ns Ar width -Set the width of the output. +Debug options: +.Bl -tag -width "1234567890123" -compact +.Pp +.It Fl - Ns Oo Cm no- Oc Ns Cm profile +Run with the Ruby profiler. .Pp +.It Fl -dump Ns = Ns Ar CACHE +Dump data from an ri cache or data file. .El .Pp .Sh ENVIRONMENT .Bl -tag -width "USERPROFILE" -compact .Pp .It Ev RI -Additional options. +Options to prepend to those specified on the command-line. .Pp +.It Ev RI_PAGER .It Ev PAGER -Used as the name of pager program for displaying. +Pager program to use for displaying. .Pp .It Ev HOME .It Ev USERPROFILE .It Ev HOMEPATH -Path to user's home directory. +Path to the user's home directory. .El .Pp .Sh FILES .Bl -tag -width "USERPROFILE" -compact .Pp -.It Pa ~/.ri -Caches recently referenced documents here. -.Pp .It Pa ~/.rdoc -Searches user-wide documents here. +Path for ri data in the user's home directory. .Pp .El .Pp .Sh SEE ALSO -.Xr ruby 1 -.Xr rdoc 1 +.Xr ruby 1 , +.Xr rdoc 1 , .Xr gem 1 .Pp .Sh REPORTING BUGS .Bl -bullet -.Li Security vulnerabilities should be reported via an email to -.Aq security@ruby-lang.org . +.It +Security vulnerabilities should be reported via an email to +.Mt security@ruby-lang.org . Reported problems will be published after being fixed. .Pp -.Li And you can report other bugs and feature requests via the +.It +Other bugs and feature requests can be reported via the Ruby Issue Tracking System .Pq Lk https://bugs.ruby-lang.org/ . Do not report security vulnerabilities -via the system because it publishes the vulnerabilities immediately. +via this system because it publishes the vulnerabilities immediately. .El .Sh AUTHORS -Written by Dave Thomas -.Aq dave@pragmaticprogrammer.com +Written by +.An Dave Thomas Aq dave@pragmaticprogrammer.com . From 7cb5c3611fcb6691564f6e5d1daf845e057609bc Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 1 Aug 2020 23:40:10 +0900 Subject: [PATCH 13/13] Add man/ri.1 for distribution files --- rdoc.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/rdoc.gemspec b/rdoc.gemspec index 9ab60cb47f..fd222d47e0 100644 --- a/rdoc.gemspec +++ b/rdoc.gemspec @@ -50,6 +50,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat "bin/setup", "exe/rdoc", "exe/ri", + "man/ri.1", "lib/rdoc.rb", "lib/rdoc/alias.rb", "lib/rdoc/anon_class.rb",