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

Support for tri-state flags with [CommandFlag] #204

Open
adambajguz opened this issue Apr 11, 2021 · 0 comments
Open

Support for tri-state flags with [CommandFlag] #204

adambajguz opened this issue Apr 11, 2021 · 0 comments
Labels
concept Help and further investigation on the proposal is needed. Typin Typin library related issues
Projects

Comments

@adambajguz
Copy link
Owner

adambajguz commented Apr 11, 2021

There are other CLI tools that include both options, e.g. --restore and --no-restore, where you are giving three possible values to the user: true (associated with Name), false (NoName) and default.

[CommandFlag(Name="flag", NoName = "no-flag")]
public bool? Flag{  get; init; } //bool? or custom struct Flag

Some problems:

  • what about current bool flags?
  • what about short flags: -abc
  • what if the dafuatl is not null but true or false?
@adambajguz adambajguz created this issue from a note in Concepts (To analyse - created while working on dynamic commands) Apr 11, 2021
@adambajguz adambajguz added concept Help and further investigation on the proposal is needed. Typin Typin library related issues labels Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concept Help and further investigation on the proposal is needed. Typin Typin library related issues
Projects
Concepts
  
To analyse - created while working on...
Development

No branches or pull requests

1 participant