mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 07:04:39 +00:00
Change the format of required arguments
This commit is contained in:
parent
39c720e6c0
commit
4712288086
@ -194,7 +194,11 @@ public:
|
|||||||
friend std::ostream& operator<<(std::ostream& stream, const Argument& argument) {
|
friend std::ostream& operator<<(std::ostream& stream, const Argument& argument) {
|
||||||
std::stringstream nameStream;
|
std::stringstream nameStream;
|
||||||
std::copy(std::begin(argument.mNames), std::end(argument.mNames), std::ostream_iterator<std::string>(nameStream, " "));
|
std::copy(std::begin(argument.mNames), std::end(argument.mNames), std::ostream_iterator<std::string>(nameStream, " "));
|
||||||
return stream << nameStream.str() << "\t" << argument.mHelp << "\n";
|
stream << nameStream.str() << "\t" << argument.mHelp;
|
||||||
|
if (argument.mIsRequired)
|
||||||
|
stream << "[Required]";
|
||||||
|
stream << "\n";
|
||||||
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user