Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭 适合新手
#12 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
88/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp
领域
cli

调研方向

从src/Prompuff.Cli/CliApp.cs开始:阅读CommandLine.Parse、它的Flags集合和未知选项的处理,然后阅读RunAsync开头的帮助检查。在tests/Prompuff.Cli.Tests/CliTests.cs中,靠近Usage_mistakes_explain_themselves的位置添加测试;运行dotnet test tests/Prompuff.Cli.Tests。完成标准:命令级别的--help和-h会打印用法并以退出码0结束,--仍会保护后面的单词,未知选项仍以退出码1结束。

由索引模型根据 Issue 内容生成。

描述

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
主要语言
C#
星标
0
派生
1
平均合并
1 小时 51 分钟
30 天内合并 PR
13

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

hazeliscoding/prompuff 的其他 Issue

查看 hazeliscoding/prompuff 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。