`ShowCommandHelp` and `ShowParameterHelp` should support incomplete parameter names (prefixes)

Aperta
#3,560 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
cli

Direzione di ricerca

Start by locating the ShowCommandHelp and ShowParameterHelp entry points and reproduce the full-name and prefix examples from the issue. Determine how parameter names are matched, then make unique prefixes work and define the stated behavior for ambiguous prefixes; done means the examples behave as described and the relevant tests pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area-CommandHelp Issue-Enhancement
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

Lingua principale
C#
Stelle
4.4k
Fork
341
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/PSReadLine

Tutte le issue di PowerShell/PSReadLine

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.