You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thinking about this more, sometimes certain enum values should not be exposed to CLI caller and so shouldn't be printed on help screen. From the other side enum value might not be equal to CLI argument value, so here might be a better approach:
enum {
@CommandArgValue("normal", "Even returns 1. Odd returns 0.")
normal_mode,
@CommandArgValue("reversed", "Even returns 0. Odd returns 1.")
reverse_mode,
some_reserved_mode, // internal value that is not exposed to CLI
}
While I do like the idea, here's some points I need sorting out:
While a case like this will definitely happen, what should we do by default? If an enum has no @CommandArgValue members then do we provide the current behaviour, or do we force the user to provide @CommandArgValue every time for every enum for every enum value they want?
Any ideas or existing examples of how to format the help text to display this information?
The text was updated successfully, but these errors were encountered:
Originally posted by @andrey-zherikov in #5 (comment):
Here you might want to allow
@Description
UDA that will be used in help text:Thinking about this more, sometimes certain enum values should not be exposed to CLI caller and so shouldn't be printed on help screen. From the other side enum value might not be equal to CLI argument value, so here might be a better approach:
While I do like the idea, here's some points I need sorting out:
While a case like this will definitely happen, what should we do by default? If an enum has no
@CommandArgValue
members then do we provide the current behaviour, or do we force the user to provide@CommandArgValue
every time for every enum for every enum value they want?Any ideas or existing examples of how to format the help text to display this information?
The text was updated successfully, but these errors were encountered: