Skip to content
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

Completion triggered by dot displays too long prefix #3

Open
wasamasa opened this issue Aug 30, 2014 · 5 comments
Open

Completion triggered by dot displays too long prefix #3

wasamasa opened this issue Aug 30, 2014 · 5 comments

Comments

@wasamasa
Copy link

Is this supposed to be expected behaviour? I'm used to just see method names if using dot completion, not the common prefix, too.

@dgutov
Copy link
Member

dgutov commented Aug 30, 2014

Pretty much. I think Bond prefers it that way: https://github.com/cldwalker/bond/blob/master/lib/bond/readline.rb#L4, and it's the most feature-rich completion method. (EDIT: ) Irb also returns better completions this way.

Of course, we could use two prefixes (one for company-mode, and another internal to inf-ruby completion logic), and convert the completions between the two, but I wonder if that's worth the trouble.

@wasamasa
Copy link
Author

Are you sure this is not merely something that can be fixed on the visual level like by just displaying everything after the dot if the dot triggered the completion and leaving the prefix alone?

@dgutov
Copy link
Member

dgutov commented Aug 31, 2014

if the dot triggered the completion

In your example above, as likely as not, m triggered completion.

Doing what I mentioned above wouldn't be particularly hard, and it would be "on the visual level". There is a certain simplicity to just displaying what Bond or Irb return, though.

@wasamasa
Copy link
Author

Actually, it is triggered after the dot, I merely narrowed the examples down by typing m.

@dgutov
Copy link
Member

dgutov commented Aug 31, 2014

That's one possible scenario, but not the only one, that would allow you to reach the state depicted on the screenshot. If you press C-g and then type m, completion should be triggered again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants