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

common substring mixes - and _ #330

Closed
vitaly opened this issue Aug 24, 2021 · 2 comments
Closed

common substring mixes - and _ #330

vitaly opened this issue Aug 24, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vitaly
Copy link

vitaly commented Aug 24, 2021

  • zsh-autocomplete version: 99f0b2a
  • Zsh version: /usr/local/bin/zsh zsh-5.8-0-g77d203f
  • Framework: zim
  • Plugin manager: none
  • Operating system: darwin19.6.0

when there are choices that differ only by - vs _, common substring is incorrectly calculated.

What I expect:

if I have directories foo-bar and foo_bar, I expect to be able to choose any of them using tab

What I get:

When I press tab it completes to foo-bar, so I can't choose foo_bar at all using completion.

REVISION: 99f0b2ad9bdaa8a94ed8edf489d0738d2303fd21
% mkdir foo-bar
% mkdir foo_bar
% cd foo
directory
foo-bar/  foo_bar/
common substring: foo-bar

# after pressing tab:
% cd foo-bar/
No matching directory, ancestor directory, corrections or history word found.
@vitaly vitaly added the bug Something isn't working label Aug 24, 2021
@marlonrichert marlonrichert self-assigned this Aug 25, 2021
@marlonrichert
Copy link
Owner

@vitaly I didn't change the common substring for your test case, because that's handled by zsh's internals and out of my control. But now, after you insert it, the other choices should still be visible and you should be able to complete them.

@vitaly
Copy link
Author

vitaly commented Aug 27, 2021

It worked, thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants