Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Help Documentation for "optional" options. #144

Open
Simonl9l opened this issue Sep 4, 2024 · 1 comment
Open

[Question] Help Documentation for "optional" options. #144

Simonl9l opened this issue Sep 4, 2024 · 1 comment

Comments

@Simonl9l
Copy link

Simonl9l commented Sep 4, 2024

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?

@neuecc
Copy link
Member

neuecc commented Sep 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants