jarro2783 / cxxopts

Lightweight C++ command line option parser
MIT License
4.16k stars 582 forks source link

-option Error message. I think we should not just report command ‘p’ error. #409

Closed seulchanson closed 7 months ago

seulchanson commented 11 months ago

image

seulchanson commented 11 months ago

boost is more reasonable. image

kkarbowiak commented 11 months ago

The behaviour is due to ability to pass joined flags. That is, -ap is equivalent to -a -p. And since you defined the -a option, it is accepted and the next one (-p) is unrecognised.

jarro2783 commented 11 months ago

Yes, in this case only the option p is the unrecognised one.

seulchanson commented 10 months ago

If we have an option --parallel [int] -p [std::string]. The input is -parallel, we can't get correct tips for parallel.
How to close command link for '-'.

jarro2783 commented 10 months ago

I don't understand the question. Can you explain a bit more what the problem is?