fix(cli): group-level help — rome <group> / <group> --help - #33
Merged
Conversation
…known-subcommand errors A bare group or 'rome cookbook --help' printed 'Unknown command' plus the full catalog. Both are now help requests (exit 0) scoped to the group's commands; an unknown subcommand errors with the group's usage instead of the full help.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rome cookbook --help(androme facts, bare) printedUnknown commandfollowed by the full command catalog — the group-level gap left by #24, which covered per-command--helponly.Now:
rome <group>/rome <group> --help|-h|help→ that group's usage (its commands + summaries), exit 0.rome <group> <unknown-sub>→Unknown commandwith the help scoped to the group's commands instead of the full catalog, exit 1.Test-first: three new behavioral cases in
test/cli.test.ts(group--helpexits 0 without "Unknown command", bare group is a help request, unknown-subcommand error excludes unrelated commands) — 125/125 pass locally, build clean.