You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When IConfigurator.TrimTrailingPeriods(false), trailing periods in the command descriptions are preserved but not in the argument or option descriptions.
To Reproduce
Run the below application dotnet run -- example --help and see the output.
Application
usingSpectre.Console.Cli;usingSystem.ComponentModel;internalsealedclassProgram{privatestaticintMain(string[]args){varapp=newCommandApp();app.Configure(cfg =>{cfg.TrimTrailingPeriods(false);cfg.AddCommand<ExampleCommand>("example");});returnapp.Run(args);}}[Description("Example command description with trailing period. Trailing period is preserved as expected.")]internalsealedclassExampleCommand:Command<ExampleCommandSettings>{publicoverrideintExecute(CommandContextcontext,ExampleCommandSettingssettings){return0;}}internalsealedclassExampleCommandSettings:CommandSettings{[CommandArgument(0,"<EXAMPLE>")][Description("Example argument description with trailing period. Looks silly when trailing period is removed from description with multiple sentences.")]publicstringExampleArgument{get;set;}=string.Empty;[CommandOption("-e|--example <VALUE>")][Description(""" Example option description with trailing period. Looks silly when trailing period is removed from multiline description. """)]publicstringExampleOption{get;set;}=string.Empty;}
Output
DESCRIPTION:
Example command description with trailing period. Trailing period is preserved as expected.
USAGE:
TrailingPeriodTrimming.dll example <EXAMPLE> [OPTIONS]
ARGUMENTS:
<EXAMPLE> Example argument description with trailing period. Looks silly when trailing period is removed from
description with multiple sentences
OPTIONS:
-h, --help Prints help information
-e, --example <VALUE> Example option description with trailing period.
Looks silly when trailing period is removed from multiline description
Expected behavior
Trailing period is preserved in all descriptions when IConfigurator.TrimTrailingPeriods(false).
Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered:
Hello @TheTonttu, I would be happy to review/merge any PR you submit for this issue. I ported the old help provider into the current format and it wasn't exactly how I wanted it at the time.
Information
Describe the bug
When
IConfigurator.TrimTrailingPeriods(false)
, trailing periods in the command descriptions are preserved but not in the argument or option descriptions.To Reproduce
Run the below application
dotnet run -- example --help
and see the output.Application
Output
Expected behavior
Trailing period is preserved in all descriptions when
IConfigurator.TrimTrailingPeriods(false)
.Please upvote 👍 this issue if you are interested in it.
The text was updated successfully, but these errors were encountered: