Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Print the usage for `prompuff <command> --help`

Aperta Adatta ai principianti
#12 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
cli

Direzione di ricerca

Inizia da src/Prompuff.Cli/CliApp.cs: leggi CommandLine.Parse, il suo insieme Flags e la gestione delle opzioni sconosciute, poi il controllo dell'aiuto all'inizio di RunAsync. Aggiungi test in tests/Prompuff.Cli.Tests/CliTests.cs, vicino a Usage_mistakes_explain_themselves; esegui dotnet test tests/Prompuff.Cli.Tests. Il lavoro è completato quando --help e -h a livello di comando stampano le istruzioni per l'uso ed escono con codice 0, -- continua a proteggere la parola successiva e le opzioni sconosciute continuano a uscire con codice 1.

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

Descrizione

enhancement good first issue

prompuff help, prompuff --help and prompuff -h print the usage, but only as the first word. prompuff render --help fails with "Prompuff doesn't know the option --help." and exit code 1, and that's the first thing many people try.

What to do

  • When --help or -h comes after a command, print the same usage text to stdout and exit 0, without opening the library.
  • Words after -- stay words, so prompuff get -- --help still looks for a prompt called --help.
  • Add --help to the Options list in the usage text.

Where to look

  • src/Prompuff.Cli/CliApp.cs: CommandLine.Parse (the Flags set at line 15, the unknown-option error at line 76), and the help check at the top of RunAsync (line 134).
  • tests/Prompuff.Cli.Tests/CliTests.cs: Usage_mistakes_explain_themselves (line 188).

Done when

  • prompuff render --help and prompuff search angular -h print the usage and exit 0.
  • prompuff get -- --help still looks up a prompt instead of printing the usage.
  • prompuff list --frob still fails with exit code 1.
  • CliContractTests passes unchanged. Nothing in tests/*/Fixtures is edited.

Testing it

dotnet test tests/Prompuff.Cli.Tests
PROMPUFF_DATA_DIR=/tmp/prompuff-dev dotnet run --project src/Prompuff.Cli -- render --help
Lingua principale
C#
Stelle
0
Fork
1
Merge medio
1h 21m
PR unite (30g)
22

Preparare l'ambiente

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 hazeliscoding/prompuff

Tutte le issue di hazeliscoding/prompuff

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.