mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Don't use bond with editline
This commit is contained in:
parent
85b93129f5
commit
c7846263ea
2 changed files with 11 additions and 8 deletions
13
lib/pry.rb
13
lib/pry.rb
|
@ -204,6 +204,11 @@ if Pry::Helpers::BaseHelpers.windows? && !Pry::Helpers::BaseHelpers.windows_ansi
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require 'bond'
|
||||||
|
rescue LoadError
|
||||||
|
end
|
||||||
|
|
||||||
require 'pry/version'
|
require 'pry/version'
|
||||||
require 'pry/rbx_method'
|
require 'pry/rbx_method'
|
||||||
require 'pry/rbx_path'
|
require 'pry/rbx_path'
|
||||||
|
@ -224,11 +229,3 @@ require 'pry/pry_class'
|
||||||
require 'pry/pry_instance'
|
require 'pry/pry_instance'
|
||||||
require 'pry/cli'
|
require 'pry/cli'
|
||||||
require 'pry/pager'
|
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.correct_indent = true
|
||||||
config.collision_warning = false
|
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 ||= OpenStruct.new
|
||||||
config.gist.inspecter = proc(&:pretty_inspect)
|
config.gist.inspecter = proc(&:pretty_inspect)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue