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

COMPLETING argument menu shown even when only one completion on paths that start ~/ #1826

Open
1 task done
tesujimath opened this issue Jul 9, 2024 · 5 comments
Open
1 task done

Comments

@tesujimath
Copy link

What happened, and what did you expect to happen?

I typed a path prefix and hit TAB. There is only one completion, and it did complete on the command line, but it left the COPMPLETING argument menu up with a single entry.

Rather than simply continue typing the path, I had to hit ENTER to accept the menu. This seems non-ergonomic to me, as what else could I want, except the single matching path?

it23677> cd ~/vc/agr-d
<TAB>

it23677> cd /home/guestsi/vc/agr-devops/
 COMPLETING argument
/home/guestsi/vc/agr-devops/

I expected not to have a menu to dismiss.

Output of "elvish -version"

0.20.1

Code of Conduct

@tesujimath
Copy link
Author

I note that if I backspace-delete some characters and hit TAB again, so long as there is only a single completion possible, it does what I expected it to do in the first place, and completes without showing the single-entry menu.

Once I start a new command line, the completion engine goes back to the behaviour of always showing the menu.

@tesujimath tesujimath changed the title COMPLETING argument menu shown even when only one completion COMPLETING argument menu shown even when only one completion on paths that start ~/ Jul 9, 2024
@hanche
Copy link
Contributor

hanche commented Jul 10, 2024

This is a duplicate of #474.

@tesujimath
Copy link
Author

tesujimath commented Jul 10, 2024

I think it is not in fact a duplicate of that issue, although a comment on that issue observes the same behaviour.

But different issues I think. Perhaps that comment specifically about the menu belongs in this issue. 😁

@hanche
Copy link
Contributor

hanche commented Jul 10, 2024

Hmm, I guess I was a bit hasty there. Not enough caffeine yet.

However, if the not-quite-duplicate is fixed, then the current issue is moot.

A related issue that I think has been discussed in the forum but perhaps not on github, is that you also get a completion menu when the completion is unique, but does not match the case of what you typed. As in search for foo, and get Foo as the unique completion. But I think that makes a bit more sense, at least on case sensitive filesystem.

@tesujimath
Copy link
Author

I think the right fix for the other issue is to produce completion(s) without expanding tilde, right? If that avoids the menu in this case, then yes, great solution.

Thanks for your insight here. 😊

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