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

Ability to change the initial filter for completion #1464

Open
roosephu opened this issue Jan 1, 2022 · 0 comments
Open

Ability to change the initial filter for completion #1464

roosephu opened this issue Jan 1, 2022 · 0 comments

Comments

@roosephu
Copy link

roosephu commented Jan 1, 2022

Currently, elvish builds an initial candidate list before completion and uses the interactive Completion mode to refine the list. For example, for the input of put $edit:re<Tab>, elvish builds a candidate list [redraw, return-eof, return-line, replace-input] and the user might use an additional filter (e.g., line) to find the candidate.

The proposal here is that we unify the two filtering processes (initial candidate list building and further refining). With this proposal, in the previous example, elvish builds a list containing all possible candidates under $edit: and sets the initial filter to re in the interactive Completion mode. Similar behavior is also expected for ls /tmp/fo.

The advantage is that it's now possible to modify the initial filter after pressing Tab. In the example, if re is too restrictive, the user must close the Completion mode first, change the filter and press Tab again before the proposal. It also sounds more intuitive to me.

Unresolved questions:

  1. How should smart-start work with this proposal?
  2. Currently, the initial candidate list is filtered by prefix matching by default. However, the Completion mode uses substring matching, so the new behavior is inconsistent with the old one.

Currently, it's implemented by #1463.

@xiaq @krader1961

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

1 participant