summaryrefslogtreecommitdiff
path: root/lib/irb/completion.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/completion.rb')
-rw-r--r--lib/irb/completion.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index 289180a3b2..573f2ed3e6 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -8,6 +8,7 @@
#
require "readline"
+require "rdoc"
module IRB
module InputCompletor # :nodoc:
@@ -197,6 +198,14 @@ module IRB
end
}
+ RDocRIDriver = RDoc::RI::Driver.new
+ PerfectMatchedProc = proc { |matched|
+ begin
+ RDocRIDriver.display_name(matched)
+ rescue RDoc::RI::Driver::NotFoundError
+ end
+ }
+
# Set of available operators in Ruby
Operators = %w[% & * ** + - / < << <= <=> == === =~ > >= >> [] []= ^ ! != !~]