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

Improve tramp candidates completion #399

Open
clemera opened this issue Jan 26, 2021 · 2 comments
Open

Improve tramp candidates completion #399

clemera opened this issue Jan 26, 2021 · 2 comments

Comments

@clemera
Copy link
Collaborator

clemera commented Jan 26, 2021

As per comment by @mathrick here:

Things I've observed:

  • I can't tell if this is a bug or intended design, but if I connect through /ssh: with an explicit username, (ie. /ssh:mathrick@example.com:), then mathrick@ and example.com will be saved separately into the list of candidates, so the next time I type /ssh:, I will have the following candidates:
  • /ssh:mathrick@
  • /ssh:example.com
  • /ssh:somewhere-else.net

But not /ssh:mathrick@example.com. And if I select the mathrick@, then the list becomes:

  • /ssh:mathrick@example.com
  • /ssh:mathrick@somewhere-else.net

Ie. it seems to be a cartesian product of the username with all possible hostnames, even if I've never actually connected with that particular combination.

  • If I type /ssh:example.com:<TAB> (that is, using default username), then go back and edit it to /ssh:mathrick@example.com:<TAB> (with an explicit username), the list of saved candidates will now include:
  • /ssh:mexample.com:
  • /ssh:maexample.com:
  • /ssh:matexample.com:
  • /ssh:mathexample.com:
  • /ssh:mathrexample.com:
  • /ssh:mathriexample.com:
  • /ssh:mathricexample.com:
  • /ssh:mathrickexample.com:

These issues aren't related to Selectrum but seem to be a general issue with tramp completions as these results are returned by the built-in file table even though those intermediate steps aren't passed to it by Selectrum and even when skipping Selectrums post command hook entirely those completions are still added.

@clemera clemera changed the title Tramp candidates completion Improve tramp candidates completion Jan 26, 2021
@manuel-uberti
Copy link

Would it make sense to report it as bug directly on Emacs or maybe ask some clarification on emacs-devel?

@glallen01
Copy link

glallen01 commented Feb 16, 2021

Removing my addition here as I think it was addressed by #487. Thank you!

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

No branches or pull requests

3 participants