Skip to content

Fix dor help <command> to show the command's help#122

Open
dormouse-bot wants to merge 1 commit into
mainfrom
fix/dor-help-subcommand
Open

Fix dor help <command> to show the command's help#122
dormouse-bot wants to merge 1 commit into
mainfrom
fix/dor-help-subcommand

Conversation

@dormouse-bot
Copy link
Copy Markdown
Collaborator

Summary

dor help split (and other subcommands) silently dropped the subject and showed the root help. dor split --help worked fine. After this change, dor help <command> shows the same output as dor <command> --help.

Two small changes in dor/src/cli.ts:

  • runCli argv rewrite handles help <command> (was help only).
  • getHelpTarget recognises help <command> as a command-scoped target, so the help patches apply.

Unknown subjects (dor help nope) still fall through to root help, matching the prior behaviour.

Test plan

  • pnpm --filter dor test — added one regression check per command (dor help <command> matches dor <command> --help), plus an unknown-subject assertion. All 23 tests pass.
  • Manually verified node dor/dist/dor.js help split and help ensure now match their --help counterparts.

`dor help split` (and other subcommands) printed the root help, dropping
the subject. `dor split --help` worked as expected. Map `help <command>`
to `<command> --help` and update the help-target resolver to match, so
the two forms produce identical output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: d920639
Status: ✅  Deploy successful!
Preview URL: https://922d7035.mouseterm.pages.dev
Branch Preview URL: https://fix-dor-help-subcommand.mouseterm.pages.dev

View logs

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.

1 participant