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

Instead of the "Display all <n> possibilities (y/n)" prompt, make MenuComplete use in-place paging to show completions that exceed the -CompletionQuery threshold #2306

Open
mklement0 opened this issue Mar 15, 2021 · 0 comments
Labels
Issue-Enhancement It's a feature request. Issue-Triaged It indicates an issue was triaged

Comments

@mklement0
Copy link

Description of the new feature/enhancement

When a given tab completion invoked via the MenuComplete function yields more items than the threshold specified via Set-PSReadLineOption -CompletionQueryItems <n> (default is 100), the tab-completion UX changes fundamentally:

  • Instead of completions, a Display all <n> possibilities (y/n) prompt is shown, which is itself somewhat disruptive.
  • On opting in, the following UX benefits are lost, because a static list is printed before the command being edited is redisplayed:

A real-life example of where this would be useful is to enable the -Encoding parameters to then offer all available encodings (consistent with the parameter type), without detriment to those users only interested in the PowerShell-defined ones - see #1844

Proposed technical implementation details (optional)

  • Never show the Display all <n> possibilities (y/n) prompt.
  • Instead, provide in-place paging that preserves the UX benefits.

Loosely speaking, MenuComplete could act like the more or less utilities, only confined to the portion of the screen that fits -CompletionQueryItems values or as much as will fit on a single screen (with room for the "ToolTip" line).

PgUp / PgDown, which already work among the items shown on the one and only "page", could be used for paging (whereas Home and End act on the command line being edited).

@mklement0 mklement0 added the Issue-Enhancement It's a feature request. label Mar 15, 2021
@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Mar 15, 2021
@mklement0 mklement0 changed the title Instead of the "Display all <n> possibilities (y/n)" prompt, make MenuComplete use in-place paging to show completions that exceed -CompletionQuery threshold Instead of the "Display all <n> possibilities (y/n)" prompt, make MenuComplete use in-place paging to show completions that exceed the -CompletionQuery threshold Mar 15, 2021
@theJasonHelmick theJasonHelmick added Issue-Triaged It indicates an issue was triaged and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement It's a feature request. Issue-Triaged It indicates an issue was triaged
Projects
None yet
Development

No branches or pull requests

2 participants