mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 07:04:39 +00:00
added fix for issue #235
This commit is contained in:
parent
a8aa3cc999
commit
6eb0ea7738
@ -1365,14 +1365,8 @@ public:
|
|||||||
|
|
||||||
// Add any options inline here
|
// Add any options inline here
|
||||||
for (const auto &argument : this->m_optional_arguments) {
|
for (const auto &argument : this->m_optional_arguments) {
|
||||||
if (argument.m_names.front() == "-v") {
|
|
||||||
continue;
|
|
||||||
} else if (argument.m_names.front() == "-h") {
|
|
||||||
stream << " [-h]";
|
|
||||||
} else {
|
|
||||||
stream << " " << argument.get_inline_usage();
|
stream << " " << argument.get_inline_usage();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Put positional arguments after the optionals
|
// Put positional arguments after the optionals
|
||||||
for (const auto &argument : this->m_positional_arguments) {
|
for (const auto &argument : this->m_positional_arguments) {
|
||||||
if (!argument.m_metavar.empty()) {
|
if (!argument.m_metavar.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user