Skip to content

Fix CommandGroup commands_ options not accessible from subcommands#102

Merged
floitsch merged 1 commit intomainfrom
floitsch/options-fix
Apr 14, 2026
Merged

Fix CommandGroup commands_ options not accessible from subcommands#102
floitsch merged 1 commit intomainfrom
floitsch/options-fix

Conversation

@floitsch
Copy link
Copy Markdown
Member

The commands_ wrapper's options (e.g. --sdk-dir) were never registered in the parser, help generator, or completion engine when dispatching to subcommands. This caused "No option named" errors at runtime.

Register commands_ options alongside the CommandGroup in all four places: parser, completion, text help global options, and JSON help global options.

Also fix indentation of Options/Rest sections in CommandGroup help output so content is indented under the title, matching the Commands section style.

The commands_ wrapper's options (e.g. --sdk-dir) were never registered
in the parser, help generator, or completion engine when dispatching to
subcommands. This caused "No option named" errors at runtime.

Register commands_ options alongside the CommandGroup in all four places:
parser, completion, text help global options, and JSON help global options.

Also fix indentation of Options/Rest sections in CommandGroup help output
so content is indented under the title, matching the Commands section style.
@floitsch floitsch requested a review from kasperl April 14, 2026 21:55
@floitsch
Copy link
Copy Markdown
Member Author

TBR.

@floitsch floitsch merged commit bfb2c3b into main Apr 14, 2026
7 checks passed
@floitsch floitsch deleted the floitsch/options-fix branch April 14, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant