Open maringuu opened 3 years ago
Aah, so this is a request for improving parseParam
and help
to support more exotic help "value descriptions" per say. Yea, if we can come up with something good, then I'm all for making this improvement :+1:
Ofc, you'll still need to handle parsing this format outside the library, but as far as I understand, that is your intention.
I'd like to parse something like
--mode <width>x<height>[@<refresh>Hz]
. To my from my current understanding this is not possible.I intended to write it as follows:
This would work but is to some extend a hack. The main problem with this is that all
help*
functions become useless because they put<>
around the value string.A simple fix would be to make the formatting in
parseParam
accept a custom formatstring. But I am not sure that this is the right solution.When this usecase is considered valid then I'll spend some time thinking about a good solution.