jarro2783 / cxxopts

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

feature request/question: support the one dash as argument #393

Open leha-bot opened 1 year ago

leha-bot commented 1 year ago

Hello, I want to make a one dash as an argument (like gcc - for consuming stdin), but can't find anything about this, while I tried to create a simple argument, it fails with runtime exception. May you help with this?

Thanks in advance for your attention, and thanks for your library, it's pretty cool! 😊

jarro2783 commented 1 year ago

The parser probably thinks that it is starting an option and is invalid. I can fix that so that a standalone - is just read as a string.

jarro2783 commented 1 year ago

What's the error? This works on the example program.