summaryrefslogtreecommitdiff
path: root/lib/irb/command/show_doc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/command/show_doc.rb')
-rw-r--r--lib/irb/command/show_doc.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/irb/command/show_doc.rb b/lib/irb/command/show_doc.rb
index dca10ec4be..4dde28bee9 100644
--- a/lib/irb/command/show_doc.rb
+++ b/lib/irb/command/show_doc.rb
@@ -15,7 +15,21 @@ module IRB
end
category "Context"
- description "Enter the mode to look up RI documents."
+ description "Look up documentation with RI."
+
+ help_message <<~HELP_MESSAGE
+ Usage: show_doc [name]
+
+ When name is provided, IRB will look up the documentation for the given name.
+ When no name is provided, a RI session will be started.
+
+ Examples:
+
+ show_doc
+ show_doc Array
+ show_doc Array#each
+
+ HELP_MESSAGE
def execute(*names)
require 'rdoc/ri/driver'