Replies: 2 comments
-
I'm having a hard time seeing how this would fit within clap's model of parsing. clap expects values to be homogenous and there would be quite some complexity to move away from that. We'd then need to make our internal processing handle a value's parser to not just parse an individual value but to control how many arguments are processed. At best, I would see this being handled on the callers side. |
Beta Was this translation helpful? Give feedback.
-
I've run into the same issue recently, it is a shame that this would be hard to implement into the current system. Perhaps we could add a less powerful version that just requires all enum variants to take the same number of arguments, even if they are of different types? Regardless, to help @iajoiner out: I ended up using a subcommand parser, which can have positional arguments, though this does pose other limitations |
Beta Was this translation helpful? Give feedback.
-
Take the following enum:
How to make it a clap argument?
I'd love to be able to execute the code as
Beta Was this translation helpful? Give feedback.
All reactions