pry / pry-coolline

Live syntax-highlighting for the Pry REPL
Other
128 stars 17 forks source link

Bond compatibility #16

Closed pdf closed 2 years ago

pdf commented 11 years ago

Trying to use bond completion with coolline results in the following:

[1] pry(main)>                                                                                                                                                                 
Bond Error: Failed internally with 'undefined method `match' for nil:NilClass'. Please report this issue with debug on: Bond.config[:debug] = true.
[1] pry(main)> Bond.config[:debug] = true                                                                                                                                      
true
[2] pry(main)> Process.Error: invalid slice size                                                                                                                               
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/menu.rb:96:in `each_slice'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/menu.rb:96:in `format_columns'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/menu.rb:34:in `list='
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/coolline.rb:394:in `complete'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/handler.rb:14:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/handler.rb:14:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/coolline.rb:420:in `handle'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/coolline-0.4.0/lib/coolline/coolline.rb:205:in `readline'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-coolline-0.2.2/lib/pry-coolline/wrapper.rb:4:in `readline'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:629:in `block in readline'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:564:in `handle_read_errors'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:609:in `readline'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:384:in `retrieve_line'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:301:in `block in r'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:298:in `loop'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:298:in `r'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:276:in `re'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:254:in `rep'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:234:in `block (3 levels) in repl'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:232:in `loop'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:232:in `block (2 levels) in repl'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:231:in `catch'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:231:in `block in repl'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:230:in `catch'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_instance.rb:230:in `repl'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/pry_class.rb:170:in `start'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/cli.rb:201:in `block in <top (required)>'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/cli.rb:70:in `call'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/cli.rb:70:in `block in parse_options'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/cli.rb:70:in `each'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/lib/pry/cli.rb:70:in `parse_options'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/gems/pry-0.9.12/bin/pry:16:in `<top (required)>'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/bin/pry:19:in `load'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/bin/pry:19:in `<main>'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/bin/ruby_noexec_wrapper:14:in `eval'
/home/user/.rvm/gems/ruby-1.9.3-p392@default/bin/ruby_noexec_wrapper:14:in `<main>'
Mon-Ouie commented 11 years ago

Hey,

I pushed a new commit on the coolline repo that should fix your exception. However, I don't think it will be of much help with Bond: if I understand correctly, one needs to write a backend for an input method to allow Bond to interface with it.

pdf commented 11 years ago

I was struggling to work out whether to post this here or against coolline. But since Pry has native Bond support now, I kind of thought that if we could get the right content out of coolline to pass to the Pry proc then we'd be in business. That was probably a pretty naive assumption though, and it looks like Pry's Bond support doesn't work with editline either.

For now I've unfortunately had to disable pry-coolline in favour of Bond's improved completion.