1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/lib/pry/bond_completer.rb

18 lines
571 B
Ruby
Raw Normal View History

module Pry::BondCompleter
def self.call(input, options)
Pry.current[:pry] = options[:pry]
Bond.agent.call(input)
end
def self.start
Bond.start(:eval_binding => lambda{ Pry.current[:pry] && Pry.current[:pry].current_context })
Bond.complete(:on => /\A/) do |input|
Pry.commands.complete(input.line,
:pry_instance => Pry.current[:pry],
:target => Pry.current[:pry].current_context,
:command_set => Pry.current[:pry].commands)
end
self
end
end