Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#12 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu ở src/Prompuff.Cli/CliApp.cs: đọc CommandLine.Parse, tập hợp Flags của nó và cách xử lý tùy chọn không xác định, sau đó đọc phần kiểm tra trợ giúp ở đầu RunAsync. Bổ sung kiểm thử trong tests/Prompuff.Cli.Tests/CliTests.cs, gần Usage_mistakes_explain_themselves; chạy dotnet test tests/Prompuff.Cli.Tests. Hoàn tất khi --help và -h ở cấp lệnh in hướng dẫn sử dụng và thoát với mã 0, -- tiếp tục bảo vệ từ tiếp theo, và các tùy chọn không xác định tiếp tục thoát với mã 1.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
C#
Star
0
Fork
1
Merge trung bình
1 giờ 21 phút
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của hazeliscoding/prompuff

Tất cả issue của hazeliscoding/prompuff

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.