ConsoleAppFramework icon indicating copy to clipboard operation
ConsoleAppFramework copied to clipboard

[Question] Help Documentation for "optional" options.

Open Simonl9l opened this issue 1 year ago • 1 comments

It seem that to have an "optional" option it must have a default value assigned to parameter in the commands method signature. Otherwise the --help indicates them as (Required) Isn't a Required option more an Argument?

This mean that for any command any "optional" options all have to be at the end of the signature, whilst this is feasible, the --help is perhaps too technical - exposing facets of the underlying implementation.

Whist a string parameter could be nullable - string? param1 = null this results in the --help saying (Default: null) - which is kinda technical, and if alternatively one defines the parameter as string param1 = "" results in the --help saying (Default: "").

Additionally the option type if nullable are used is defined as --param <string?> tha tis also a tad technical.

If there was a way to say it's optional say, in part of the /// <param....></param> the help could just say (Optional) - or nothing (as it's already described as being part of Options:)?

An option is possibly required, dependent on the presence of other options, but this is also not configurable?

Simonl9l avatar Sep 04 '24 00:09 Simonl9l

Arguments are options for ordering.

I think it's unavoidable that the default outputs technical details, but I agree that there are cases where you don't want to show them. I'd like to make it possible to manually adjust the range a bit more.

neuecc avatar Sep 09 '24 10:09 neuecc

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Mar 09 '25 00:03 github-actions[bot]

@neuecc per your comment above - is this still on radar?

I'd like to make it possible to manually adjust the range a bit more.

Simonl9l avatar Mar 09 '25 00:03 Simonl9l

I might check the PR if there is one, but I can't focus on implementation time (and considering corner cases) right now.

neuecc avatar Jun 23 '25 08:06 neuecc

maybe #201 solved.

neuecc avatar Nov 06 '25 09:11 neuecc