Commit d3f4f5f208ee76a22ff39c13df4d150712685f5f introduced automatic conversion to FileInfo and DirectoryInfo but failed to properly handle the conversion if the value comes from the [DefaultValue] attribute.
Using both `var (converter, stringConstructor) = GetConverter(...)` and `var (converter, _) = GetConverter(...)` should have been a red flag!
* Do not emit line break when rendering
* Don't be greedy when measuring.
* Fix a condition that decides if the path fits in the allotted space.
Closes#1307
Also, I switched the base width of the AsciiCast back
to 82 (from 120) so newly created casts are no longer
overflowing the display with on the pages.
Re-created the Panel and BreakdownChart casts, as
they were currently overflowing due to the 120 chars
width of the cast.
Allow custom help providers
* Version option will show in help even with a default command
* Reserve `-v` and `--version` as special Spectre.Console command line arguments (nb. breaking change for Spectre.Console users who have a default command with a settings class that uses either of these switches).
* Help writer correctly determines if trailing commands exist and whether to display them as optional or mandatory in the usage statement.
* Ability to control the number of indirect commands to display in the help text when the command itself doesn't have any examples of its own. Defaults to 5 (for backward compatibility) but can be set to any integer or zero to disable completely.
* Significant increase in unit test coverage for the help writer.
* Minor grammatical improvements to website documentation.
When subclassing `Command<TSettings>` which has the [NotNull] attributes, Rider/ReSharper gives this warning:
> Nullability of type of parameter 'context' in method does not match overridden member `int Spectre.Console.Cli.Command<TSettings>.Execute(CommandContext, TSettings)` (possibly because of nullability attributes)
When subclassing `Command<TSettings>` which does not have the [NotNull] attributes, Rider/ReSharper gives this warning:
> The nullability attribute has no effect and can be safely removed
The solution is simply to remove the [NotNull] attributes.
Since `<Nullable>enable</Nullable>` is set in the project, they are actually not necessary. By the way, the non-generic `Command` class does not have the [NotNull] attributes.
This matches the actual content of the repository (except for a few files which have CRLF instead of LF)
The motivation behind this change is that Rider observes the .editorconfig rules and changes the line ending to CRLF on save. When submitting pull requests the diff is full of changes because all the end of lines were changed from LF to CRLF. By setting `end_of_line` to `LF` the end of lines are not changed on save and the diffs are clean when submitting pull requests.
This was initially introduced in 3c5b98123b4c9cd50a37da25ca9a3fd34ac7f479 by Daniel Cazzulino, then reverted in 82de4a55c48e269225ff2b137850a303b3776879 by Patrick Svensson because of a bug in the .NET 6.0.401 SDK.
Add support for converting command parameters that doesn't have a built-in TypeConverter but has a constructor that takes a string. For CLI apps, FileInfo and DirectoryInfo will likely be the most useful ones, but there may be others.