Skip to content

Conversation

@kojix2
Copy link
Contributor

@kojix2 kojix2 commented Nov 6, 2025

Hi

This PR fixes a bug in OptionParser#handle_flag where subcommand help output did not respect custom summary_indent settings.

This change only affects help message formatting (to_s output)

help.should eq <<-USAGE
Usage: foo subcommand
||--help Help
||--local Local flag
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note on Flag Ordering
In the help output, common flags like --help appear before subcommand-specific flags like --local. This happens because OptionParser shows flags in the order they are registered.

This may not be the best user experience, but fixing the flag order is not part of this PR.

@Blacksmoke16 Blacksmoke16 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib labels Nov 6, 2025
@straight-shoota straight-shoota added this to the 1.19.0 milestone Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants