-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve method completion for string and regexp that includes word break characters #523
Improve method completion for string and regexp that includes word break characters #523
Conversation
Is it possible to resolve the issue by assigning proper
This should probably be updated. |
I think it's not possible now. If I add movie.mp4 |
…ger include every possible methods
OK 👍 I removed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm it looks like a reline's bug, or completer_quote_characters
has very limited use cases if that's intentional.
Can you add comments before the changed regexps to give readers some context?
Co-authored-by: Stan Lo <stan001212@gmail.com>
Co-authored-by: Stan Lo <stan001212@gmail.com>
includes word break characters (ruby/irb#523) * Improve method completion for string and regexp that includes word break characters * Remove completion-test's assert_not_include because candidates no longer include every possible methods * Add comment about string's method completion regexp Co-authored-by: Stan Lo <stan001212@gmail.com> * Add comment about regexp's method completion regexp Co-authored-by: Stan Lo <stan001212@gmail.com> --------- ruby/irb@aa8128c533 Co-authored-by: Stan Lo <stan001212@gmail.com>
Description
fixes #314
In these case, irb cannot correctly complete string and regexp methods.
"()".
"hello world".
This pull request fixes it.
Background
Readline and Reline has a configuration
completer_quote_characters
andcompleter_word_break_characters
of completion target.It was able to calculate
"()".
completion target correctly.In this pull request(#212),
Reline.completer_quote_characters = ''
is added, which means reline does not consider quotes in completion target calculation.Completion target calculated by reline changed from
"hello world".
toworld".
and the regexp needed to be updated.Change
I changed string completion regexp to match
anything".
I also changed regexp for regexp completion.Since array completion regexp matches to
].
, changing string completion regexp to match".
is acceptable(in my opinion).