Pre-detect a --help / -h / --version / -V request in argv, plus
the first recognized subcommand if any. Runs before parseCommand so the
help/version intents short-circuit without going through the option parser
(which would reject --help as an unknown option in every subcommand).
The "first recognized subcommand wins" rule means issue_tree bogus --help
resolves to top-level help (the bad subcommand is ignored when help is
requested), while issue_tree scan --help resolves to scan-specific help.
--version / -V outrank --help / -h when both appear in the same
argv, matching the de-facto convention of every major CLI.
Pre-detect a
--help/-h/--version/-Vrequest inargv, plus the first recognized subcommand if any. Runs beforeparseCommandso the help/version intents short-circuit without going through the option parser (which would reject--helpas an unknown option in every subcommand).The "first recognized subcommand wins" rule means
issue_tree bogus --helpresolves to top-level help (the bad subcommand is ignored when help is requested), whileissue_tree scan --helpresolves to scan-specific help.--version/-Voutrank--help/-hwhen both appear in the same argv, matching the de-facto convention of every major CLI.