bond icon indicating copy to clipboard operation
bond copied to clipboard

Autocompletion with quote does not work properly

Open danghvu opened this issue 12 years ago • 5 comments

To reproduce (Ubuntu 12.04, ruby-2.0.0-p0, ripl-0.7.0, bond-0.4.3):

$ ripl
>> "A".inspec<TAB>
>> "A".inspect" 

Please notice the trailing " Similar with ' case. I remove ' and " from DefaultBreakCharacters at lib/bond/readline.rb:4 and it work as expected however unsure if it would break other parts.

danghvu avatar Jun 26 '13 17:06 danghvu

Thanks for reporting your issue! This is one of my 12 active issues. Use that link to check how soon your issue will be answered. Don't forget to check your issue against this project's CONTRIBUTING.md. Cheers.

cldwalker avatar Jun 26 '13 17:06 cldwalker

Those default word break characters are standard ones that come with Readline. I tried your suggested change but that broke several other tests.

This is a bug so I'm definitely open to a pull on this. I won't be getting to it anytime soon.

cldwalker avatar Jul 03 '13 22:07 cldwalker

I think it's a problem with basic_quote_characters implementation. By default readline set it as "'. If you set it to an empty string the problem is gone however you won't have " appended for completion like "hel<TAB>. If this can be compromised in order to solve the initial problem then I can make a pull to see how it goes. (rake return all green with this modification)

danghvu avatar Jul 03 '13 23:07 danghvu

I'd prefer not to feature regress in exchange for a bug fix. I'll leave this open to see if we can come up with another solution.

cldwalker avatar Jul 04 '13 03:07 cldwalker

To clarify, I'm open to a pull that doesnt' make Bond deviate from Readline's basic_word_break_characters or completer_word_break_characters

cldwalker avatar Jan 02 '14 01:01 cldwalker