Skip to content

ShowCommandHelp and ShowParameterHelp should support incomplete parameter names (prefixes) #3560

Open
@mklement0

Description

@mklement0

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

Currently, for said functions to recognize a parameter and jump to the relevant section in the help file / show the parameter type and description below the command line it must be spelled out in full.

# OK, parameter name spelled out in full
Get-Item -LiteralPath<Alt-h>

# !! NO-OP, because the the parameter name is only identified *by prefix*, not spelled out in full.
Get-Item -Lit<Alt-h>

While tab-completing a parameter-name prefix first bypasses the problem, the need to do so is surprising, given that a unique prefix is sufficient for invocation of a command.

If the prefix isn't unique (e.g. Get-ChildItem -F<Alt-h>), I suggest resolving the problem as follows:

  • ShowCommandHelp: jump to the first parameter with the given prefix.
  • ShowParameterHelp: either do nothing, or display a message indicating the ambiguity.

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CommandHelpLabel for issues related to ShowCommandHelp and the pagerIssue-EnhancementIt's a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions