Skip to content
Permalink
Browse files

Show documents when completion

  • Loading branch information...
aycabta committed Apr 27, 2019
1 parent 260235c commit 559dca509d2a98584b09c7d9a6d74749ce793ad7
Showing with 12 additions and 1 deletion.
  1. +9 −0 lib/irb/completion.rb
  2. +1 −0 lib/irb/input-method.rb
  3. +1 −1 lib/rdoc/ri/paths.rb
  4. +1 −0 lib/rubygems.rb
@@ -8,6 +8,7 @@
#

require "readline"
require "rdoc"

module IRB
module InputCompletor # :nodoc:
@@ -197,6 +198,14 @@ def defined do
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[% & * ** + - / < << <= <=> == === =~ > >= >> [] []= ^ ! != !~]

@@ -222,6 +222,7 @@ def initialize
end
Reline.completion_append_character = nil
Reline.completion_proc = IRB::InputCompletor::CompletionProc
Reline.dig_perfect_match_proc = IRB::InputCompletor::PerfectMatchedProc
end

def check_termination(&block)
@@ -1,5 +1,5 @@
# frozen_string_literal: true
require 'rdoc/ri'
require 'rdoc/rdoc'

##
# The directories where ri data lives. Paths can be enumerated via ::each, or
@@ -18,6 +18,7 @@ module Gem
require 'rubygems/defaults'
require 'rubygems/deprecate'
require 'rubygems/errors'
require 'rubygems/path_support'

##
# RubyGems is the Ruby standard for publishing and managing third party

0 comments on commit 559dca5

Please sign in to comment.
You can’t perform that action at this time.