Skip to content

Clarify built-in help when manually parsing commands - #982

Merged
natecook1000 merged 1 commit into
apple:mainfrom
rksharma-owg:codex/parser-297-manual-help
Oct 5, 2026
Merged

natecook1000 merged 1 commit into
apple:mainfrom
rksharma-owg:codex/parser-297-manual-help

Conversation

@rksharma-owg

Copy link
Copy Markdown
Contributor

Clarify that parseAsRoot() can return the built-in help command for --help and the help subcommand, as well as user-defined commands. The article now explains why its default branch runs the returned command and forwards errors to the root command's exit(withError:) method.

Addresses the manual-parsing documentation request in #297. This change does not address the separate variance-example observation in that issue.

Validation:

  • Verified both help inputs return the help command; running it and formatting its error through the root command produces help with exit code 0.
  • Local DocC generation and analysis passed with warnings treated as errors.
  • Fork validation of a57d9f4fe2dd4579a6ffde21304517dd7845b1ef passed all applicable Linux, Windows, macOS, Wasm, CMake, documentation and soundness checks across the initial matrix and the macOS Swift 6.1 SDK correction. The SDK correction is fork-only infrastructure.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate (documentation only; checked the described behavior directly)
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@natecook1000
natecook1000 enabled auto-merge (squash) October 5, 2026 04:12
@natecook1000

Copy link
Copy Markdown
Member

Thanks, @rksharma-owg!

@natecook1000
natecook1000 merged commit efd239f into apple:main Oct 5, 2026
37 checks 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