oldwinter / oldwinter/hctl

体验:hctl 未知命令只报 unknown command,不说 --help 或 testdata 示例

Open Beginner friendly
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
0
Forks
0
Avg merge
10m
Merged PRs (30d)
12

Description

现在的体验

hctl get / describe / apply 缺参已经带 example。hctl doctor 缺配置是另一条票(#28)。Adapter 双真源是 #27。

hctl nosuch 只打 unknown command "nosuch" for "hctl"。根命令开了 SilenceErrors,不会附带 --help 或 README 里的 testdata 命令。

问题

打错子命令的人看不到下一步。这和缺资源名、缺配置不是同一题。

建议改动

未知命令在原错误后面加 try: hctl --helphctl --home testdata/home-a --config testdata/harnessctl.yaml get harnesses

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the root command configuration where SilenceErrors is enabled, then reproduce the current output with hctl nosuch. Update the unknown-command experience to include try: hctl --help and the testdata example hctl --home testdata/home-a --config testdata/harnessctl.yaml get harnesses, and verify both suggestions appear after the original error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.