Skip to content

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

Description

@mklement0

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions