Print long names in help option

Related to #240, #363, and #349
This commit is contained in:
AmirHossein Sojoodi 2023-11-30 13:54:41 -05:00 committed by GitHub
parent 554396be3b
commit dfeeffc606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2088,9 +2088,21 @@ format_option
result += " ";
}
if (!l.empty())
auto is_first_name = true;
for (const auto& name : o.l)
{
result += " --" + toLocalString(l);
if (!name.empty())
{
if (is_first_name)
{
result += " --" + toLocalString(name);
is_first_name = false;
}
else
{
result += ", --" + toLocalString(name);
}
}
}
auto arg = !o.arg_help.empty() ? toLocalString(o.arg_help) : "arg";