Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

"Short" args must be single letter to work, but not checked #91

Open
rpavlik opened this issue May 1, 2019 · 1 comment
Open

"Short" args must be single letter to work, but not checked #91

rpavlik opened this issue May 1, 2019 · 1 comment

Comments

@rpavlik
Copy link

rpavlik commented May 1, 2019

Discovered "the hard way" in a Catch2-using project that while you are allowed to add flags like ["-abc"] for an Opt, trying to actually specify it will never work - you'll just get:

Error(s) in input:
  Unrecognised token: -a

I imagine it's doing this because it wants to support combining short options. However, in that case, there should probably be a check at parser-creation time for single-letter usage with short option symbol.

@grafikrobot
Copy link

I addressed this in the Lyra lib by making ["-abc"] equate to ["-a"]["-b"]["-c"]. As it mirrors the usage and avoid exceptions. Change is available from this version bfgroup/Lyra@d4db7b8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants