Add a configuration setting to disable capitalisation of option value placeholders in help output
The option value placeholders in the help text are always capitalised.
e.g.
[CommandOption("-d <ItemDescription>")]
produces the following option text in the help output
-d <ITEMDESCRIPTION>
This appears to be the line of code which does this: TemplateParser.cs#L133
I would like there to be a configuration setting to disable this - as I prefer the help option to be as follows
-d <ItemDescription>
Please upvote :+1: this issue if you are interested in it.
@dsparkplug You are dead right, what a pain.
Hello, I am interested on working on this issue. Can you please assign it to me?
I am unable to work on this issue at the moment. Please assign it to someone else. Thanks!
Hello, I'm interested in working on it. For the feature, is it only on CommandOption, or maybe other command help output ?
@Happistarz Sure. This involves option values as well as arguments.
Ok, i will add configuration for the argument and option command help output by creating static booleans in the best related class. Can you please assign this issue to me ? thanks.
Hey, is this issue still free to pick? I worked on it in my spare time and I might push a PR if you want. If interested you can see the changes on this branch.
In short:
- Added
CapitalizeOptionValuePlaceholdersproperty toICommandAppSettingsandCommandAppSettings(defaults to true for backwards compatibility) - Extended
TemplateParser.OptionResultto store both original and capitalized value names - Updated
HelpProviderwith the core logic - Added
DisableOptionValuePlaceholderCapitalization()to easily access this config - Added unit tests
Users can disable the placeholder capitalization like this:
var app = new CommandApp();
app.Configure(config =>
{
config.DisableOptionValuePlaceholderCapitalization();
});
PS Didn't open a PR because the template explicitly says:
Do NOT open a PR without discussing the changes on an open issue, first.
cc: @patriksvensson