I have a (complex) set of options used to define the properties of an argument (some properties are optional, others mandatory, it's not a simple set).
I now need to write a subcommand that manipulates sets of this argument. Unfortunately, all the arguments in the set do not necessarily share the same properties.
The natural user-friendly way to do it would be to rely on
Order between options and arguments is significant
each ARG takes the option values specified before it on the CLI
ARGs without options take the same options as the first preceding ARG with options
ARGS with no option at all should appear first (or I should define a specific nooption option)
mow.cli would then generate lists of structs for ARGS, with the ARG value as main field, and all the usual option lists as other fields
Short term I will pretend all the arguments share the same properties, but I'm pretty sure that a user will remind me this design is broken in the next months
I have a (complex) set of options used to define the properties of an argument (some properties are optional, others mandatory, it's not a simple set).
I now need to write a subcommand that manipulates sets of this argument. Unfortunately, all the arguments in the set do not necessarily share the same properties.
The natural user-friendly way to do it would be to rely on
and basically do something like
Which basically means that:
mow.cli
would then generate lists of structs for ARGS, with the ARG value as main field, and all the usual option lists as other fieldsShort term I will pretend all the arguments share the same properties, but I'm pretty sure that a user will remind me this design is broken in the next months