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

Can't tab-complete to highlight autcomplete entries for certain files which share prefixes #833

Closed
132ikl opened this issue Sep 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@132ikl
Copy link

132ikl commented Sep 25, 2024

Platform Arch Linux
Terminal software alacritty
Nushell 71d604

It seems like under some circumstances I'm not able to press tab to highlight autocomplete for files. I think it's related to the files having the same prefix, but I'm not sure. I haven't fully bisected the issue, but I wasn't able to reproduce the issue on nushell 28a746 and was able to reproduce the issue on 71d604. There was a reedline update between those two commits which includes 2a57906, 4096b93, and 660a507. The latter seems the most related to the issue, so I suspect it's the culprint (@uek-1)

Steps to reproduce

In nushell,

  1. Make a new directory and cd into it
  2. touch testa testb testc
  3. ls test<TAB>, then continue to press tab. testc will not be highlighted, however you can still select it with right arrow.
@uek-1
Copy link
Contributor

uek-1 commented Sep 26, 2024

Took a look at this, it is indeed caused by my changes. menu.can_partially_complete(...) resets the selected item to 0 which makes it impossible to continue past the second suggestion. I opened a PR that would fix this issue by returning false when the suggested partial completion is exactly equal to the input contents (#834). I think it's a little confusing that the function menu.can_partially_complete() mutates at all - it might make more sense to split it into two different functions.

@132ikl
Copy link
Author

132ikl commented Oct 13, 2024

Resolved by #834

@132ikl 132ikl closed this as completed Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants