spectre.console icon indicating copy to clipboard operation
spectre.console copied to clipboard

Trimming periods off documentation

Open kevinms99 opened this issue 3 years ago • 2 comments

I was surprised that the help output chops periods off documentation when using Spectre.Console.Cli. Occasionally, I create commands that need a little more context than I can put into a single sentence, so I ended up with documentation that had several sentences -- the last sentence ends up with no period (even though I add it in my DescriptionAttribute).

I'm curious whether there's some standard or tradition that I'm unaware of that leads to this approach. Would you consider making this an optional behavior (maybe as a part of the configuration of the CommandApp?)?

Thanks for all the work you've done here. Spectre.Console is awesome!

kevinms99 avatar Jul 22 '22 12:07 kevinms99

@kevinms99 seems this is intended:

https://github.com/spectreconsole/spectre.console/blob/3a7b8aa1d2bc97493a17d9a0d902eb4a93248e5e/src/Spectre.Console.Cli/Internal/HelpWriter.cs#L364-L366

I'm curious whether there's some standard or tradition that I'm unaware of that leads to this approach.

Not that I'd be aware of it. (Then again, I've not seen many other implementations...)

@patriksvensson @phil-scott-78 what do you think?

nils-a avatar Aug 05 '22 09:08 nils-a

I see this even for short sentences. From the simple getting started example:

[Description("Path to search. Defaults to current directory.")]

Renders as:

    [searchPath]    Path to search. Defaults to current directory

Note the lack of a trailing full stop.

This is a nitpicking issue - unimportant, but devs notice these small things until it drives us mad. Glad it's not just me. :smile: :clown_face:

Thanks for all the work you've done here. Spectre.Console is awesome!

Agreed!

lonix1 avatar Aug 27 '22 01:08 lonix1

This is actually by design, but open to changing it if someone is willing to submit a PR.

patriksvensson avatar Oct 04 '22 18:10 patriksvensson