bfgroup / Lyra

A simple to use, composable, command line parser for C++ 11 and beyond
https://bfgroup.github.io/Lyra/
Boost Software License 1.0
471 stars 56 forks source link

Allow single-hyphenated long names #39

Closed gbx-bfriedman closed 3 years ago

gbx-bfriedman commented 3 years ago

There are some cases where the platform or environment of an application requires it to support a single-hyphenated command line option with a long name.

Framework & Documentation Example Argument
OpenAutomate -openautomate [key]
Epic Games Store -AUTH_TYPE=[type]

I'd like Lyra to have an option to interpret single-hyphenated options as a single option rather than a list of options. This could be a build-time setting or a global setting, I don't think it needs to be per-option, though I would accept that solution as well.

grafikrobot commented 3 years ago

Interesting... I initially did the work on this library because of having to support different option prefixes. This is definitely I can find a way to support as there's already support to customize the prefix and name/value separators. Thanks for the request.