Skip to content

fix(cli): hide completion command from top-level help (closes #39) - #252

Open
raptor7197 wants to merge 1 commit into
optiqor:mainfrom
raptor7197:main
Open

fix(cli): hide completion command from top-level help (closes #39)#252
raptor7197 wants to merge 1 commit into
optiqor:mainfrom
raptor7197:main

Conversation

@raptor7197

Copy link
Copy Markdown

What

hides the completion command from top-level help. the command itself and all four shell generators are unchanged.

Why

Fixes #39

pr #55 shipped the feature but missed the last acceptance criterion: "hidden from the top-level help by default". the command is plumbing, not a user-facing feature.

How

single-line change: set Hidden: true on the cobra command. hidden commands stay fully functional and keep generating valid scripts. no new tests needed; existing TestCompletionCmd covers all four shells.

Testing

  • go build ./... passes

  • go test ./internal/cli/ passes (full go test ./... not run locally, no docker for integration tests)

  • go vet ./... passes

  • golangci-lint run ./... passes

  • tested locally with: /tmp/kerno --help | grep -i completion (0 matches), /tmp/kerno completion bash | bash -n, zsh -n, fish --no-execute, and __complete do / __complete doctor --output '' return correct suggestions

  • N/A - pure docs/refactor

Checklist

  • PR title follows Conventional Commits (fix(cli): hide completion command from top-level help)
  • All commits are DCO-signed (git commit -s)
  • No unrelated changes pulled in
  • Documentation updated where user-visible behavior changed (n/a — no user-visible behavior beyond help output; readme already documents the command)
  • Added/updated tests for new code paths (n/a — existing tests cover the command; hiding only affects help rendering)
  • If a new doctor rule, paired with a chaos scenario in scripts/verify.sh (n/a)

)

Signed-off-by: raptor7197 <vamsikrishna75836@gmail.com>
@github-actions github-actions Bot added the level:intermediate 50-200 lines or 3-5 files (auto-applied) label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🚀 First PR — welcome aboard!

A few things to expect:

  1. CI: every PR runs build + race tests + lint + (eventually) the kernel matrix. If something fails, the log will tell you exactly which gate.
  2. DCO: every commit needs Signed-off-by:git commit -s adds it automatically.
  3. Conventional Commits: PR titles like feat(doctor): add new rule or fix(bpf): handle X. We squash-merge by default.
  4. Review: a maintainer will review within 72 hours. Suggestions are conversations, not orders — push back if something doesn't fit your context.

If you get stuck, reply here or jump to Discussions. We want this PR to land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:intermediate 50-200 lines or 3-5 files (auto-applied)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: shell completion (bash/zsh/fish/PowerShell)

1 participant