Don't use bond with editline
This commit is contained in:
parent
85b93129f5
commit
c7846263ea
13
lib/pry.rb
13
lib/pry.rb
|
@ -204,6 +204,11 @@ if Pry::Helpers::BaseHelpers.windows? && !Pry::Helpers::BaseHelpers.windows_ansi
|
|||
end
|
||||
end
|
||||
|
||||
begin
|
||||
require 'bond'
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
require 'pry/version'
|
||||
require 'pry/rbx_method'
|
||||
require 'pry/rbx_path'
|
||||
|
@ -224,11 +229,3 @@ require 'pry/pry_class'
|
|||
require 'pry/pry_instance'
|
||||
require 'pry/cli'
|
||||
require 'pry/pager'
|
||||
|
||||
begin
|
||||
require 'bond'
|
||||
rescue LoadError
|
||||
Pry.config.completer = Pry::InputCompleter
|
||||
else
|
||||
Pry.config.completer = Pry::BondCompleter
|
||||
end
|
||||
|
|
|
@ -265,6 +265,12 @@ class Pry
|
|||
config.correct_indent = true
|
||||
config.collision_warning = false
|
||||
|
||||
if defined?(Bond) && Readline::VERSION !~ /editline/i
|
||||
config.completer = Pry::BondCompleter
|
||||
else
|
||||
config.completer = Pry::InputCompleter
|
||||
end
|
||||
|
||||
config.gist ||= OpenStruct.new
|
||||
config.gist.inspecter = proc(&:pretty_inspect)
|
||||
|
||||
|
|
Loading…
Reference in New Issue