Skip to content

Shorten top-level help output#6

Merged
evanphx merged 4 commits into
mainfrom
evan/short-toplevel-help
Feb 11, 2026
Merged

Shorten top-level help output#6
evanphx merged 4 commits into
mainfrom
evan/short-toplevel-help

Conversation

@evanphx

@evanphx evanphx commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Top-level help now lists only command names without descriptions, keeping output concise
  • Commands and namespaces with children show a "(N sub-commands)" count so users know to drill deeper
  • Command-specific help and namespace help retain full descriptions for sub-commands

Test plan

  • TestDispatcherHelp verifies top-level help omits descriptions
  • TestDispatcherSubCommandHelp verifies sub-command count appears for namespaces
  • TestDispatcherNamespaceDiscovery verifies namespace count at top level
  • Full test suite passes

…unts

Top-level help no longer shows descriptions for each command, keeping
the output concise. Commands and namespaces with children now display
a "(N sub-commands)" indicator so users know to drill deeper.
@evanphx evanphx requested a review from a team as a code owner February 11, 2026 19:11
Uses golang.org/x/term to detect if stdout is a terminal and applies
faint ANSI styling to "(N sub-commands)" hints. Respects NO_COLOR.
The IsTerminal check is cached with sync.OnceValue.
@evanphx

evanphx commented Feb 11, 2026

Copy link
Copy Markdown
Contributor Author

Example output:
CleanShot 2026-02-11 at 11 26 17@2x

@phinze phinze left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

@evanphx evanphx merged commit f9634cd into main Feb 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants