-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Insert longest common prefix #35
Comments
This is something I've tried to solve before, but did not commit, because it impacted performance significantly. This is because I cannot control the sorting directly. I have to use the completion system's grouping mechanism to fake it. However, now that we have asynchronous completion, I could give it another try and at least provide it as an option, with a note about the performance hit. 🙂 |
Yeah I understand that it might be tricky but it's a fairly big annoyance since it deviates so much from normal shell behavior when hitting tab. You really expect it to complete with the right thing, so it throws me off a lot when I quickly tab and enter and it ends up inserting something completely different. |
@Dwight-D Alright, here it is on the |
Nice! It seems to be fixed for a few issues, but the example I posted here still fails. I'll keep using it throughout the day and see if I can figure out any pattern to it. |
@Dwight-D If the example you posted here fails, then you have not enabled the feature. You should have the following in your zstyle ':autocomplete:tab:*' completion insert |
Okay, my bad. This is great, I love it! |
No, wait, there are some weird quirks
Expected behavior: cycle through I also noticed that some autocompletions are now inserting space when I tab partway through a path.
Expected behavior: no space at the end of completion
This last one I'm not sure if it's new behavior, can't recall when I last used kubectl like this. I haven't noticed it for any other programs yet, it doesn't happen for all completions. Might be an error in kubectl completions but it didn't use to behave like this without the plugin. |
Thanks, that's easy to change.
Why? What's the logic behind that? I would expect it to complete
I cannot reproduce that, because I don't have access to |
Completing to Honestly I couldn't remember the default shell behavior here which is why I threw in the
No, that's the only error I've run across so far but I'll let you know if I find any others. Most of the time it seems to work fine for me as well. |
@Dwight-D It's now available on the |
Hi, |
@vendelin8 It seems to work for me. Can you please give me some test cases for which it fails? |
My related
And without sudo it works fine.
|
That is because you get more matches with I'll see if I can make the matching a bit more strict/less fuzzy (perhaps only for users who have |
I'd be happy with a common prefix, if there's an option for that. Is it? |
That's the one I'm talking about. There is no difference. However, I did some more testing and I found that there's actually a bit more going on. I'm working on a patch that will improve this. |
Fixes a problem mentioned in issue #35.
@vendelin8 It should be better now. Please try again. |
Awesome, it works fine, thank you! |
Matches are presented in lexicographical order with no regard to the accuracy of the matches.
I would expect suggestions starting with my input to be prioritized over a match in a substring.
This interferes with the behavior of the tab key, as compared to in the normal shell experience. I would expect tab to first insert perfect matches starting with what I've typed, and not the first match in lexicographical order.
Steps to reproduce:
Expected behavior:
The text was updated successfully, but these errors were encountered: