command-line-api
command-line-api copied to clipboard
Improve help sections layout.
Currently, the spacing between the help sections is controlled by the mutable property “HelpContext.WasSectionSkipped”,
which is also shared by section delegates.
In addition, the property is internal, which makes it difficult to customize the help if you want to add a new section.
I suggest to remove the HelpContext.WasSectionSkipped
property and to modify the signature of the section delegate from Action<HelpContext>
to Func<HelpContext, bool>
.
The section delegate would return false for an empty section and true otherwise.
A fix is available in pull request #2238