Description
When a clap-managed nested subcommand under vp pm or vp env is typoed, adding --help currently causes the CLI to fall back to the parent command help instead of reporting the invalid nested subcommand.
For example:
vp pm aprev-build --help
vp env pni --help
These should not be swallowed by the vp pm or vp env parent help. The CLI should make it explicit that the nested subcommand is invalid, even when --help appears after the typoed subcommand.
This issue is scoped to clap-managed nested command parsing under:
Delegated command surfaces such as vp run, vp dev, vp build, top-level vp config, or vp staged are intentionally out of scope.
Suggested solution
When a clap-managed nested subcommand is invalid:
- Show an unknown-command error for the invalid nested subcommand.
- Apply the same behavior even when
--help is present after the invalid nested subcommand.
- If a close valid command exists, show a
Did you mean ...? style suggestion.
- Do not print the parent command help for the typo case.
- Do not auto-run the corrected command.
- Do not show an interactive correction prompt for nested commands.
- Exit non-zero with or without
--help.
- Preserve existing top-level typo behavior.
Representative output shape:
error: Command 'aprev-build' not found
Did you mean 'approve-builds'?
Additional context
No response
Validations
Description
When a clap-managed nested subcommand under
vp pmorvp envis typoed, adding--helpcurrently causes the CLI to fall back to the parent command help instead of reporting the invalid nested subcommand.For example:
These should not be swallowed by the
vp pmorvp envparent help. The CLI should make it explicit that the nested subcommand is invalid, even when--helpappears after the typoed subcommand.This issue is scoped to clap-managed nested command parsing under:
vp pm <subcommand>vp env <subcommand>deeper
vp pmgroups where applicable, such as:vp pm stage <subcommand>vp pm owner <subcommand>vp pm config <subcommand>vp pm token <subcommand>Delegated command surfaces such as
vp run,vp dev,vp build, top-levelvp config, orvp stagedare intentionally out of scope.Suggested solution
When a clap-managed nested subcommand is invalid:
--helpis present after the invalid nested subcommand.Did you mean ...?style suggestion.--help.Representative output shape:
Additional context
No response
Validations