Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The short name is limited to 1 char #96

Open
bcristian opened this issue May 7, 2020 · 0 comments
Open

The short name is limited to 1 char #96

bcristian opened this issue May 7, 2020 · 0 comments

Comments

@bcristian
Copy link

Version 1.73.0

Documentation (https://www.boost.org/doc/libs/1_73_0/doc/html/boost/program_options/option_description.html#id-1_3_31_9_7_1_1_2_5-bb):

The 'name' parameter is interpreted by the following rules:
if there's no "," character in 'name', it specifies long name
otherwise, the part before "," specifies long name and the part after -- short name.

Code, options_descriptions.cpp, line 205:

if (last_name.length() == 1) {
                m_short_name = '-' + last_name;
                m_long_names.pop_back();

This limitation is not mentioned in the docs.
I would prefer that short names of several characters are allowed, but otherwise the limitations should be at least mentioned.
Side note: the possibility of having several long names separated by colons is not mentioned there, either.

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

No branches or pull requests

1 participant