mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-05 14:43:52 +00:00
Adding positional name to name
This commit is contained in:
parent
87d8391426
commit
9b31ef38d8
@ -162,6 +162,8 @@ public:
|
|||||||
/// Gets a , sep list of names. Does not include the positional name.
|
/// Gets a , sep list of names. Does not include the positional name.
|
||||||
std::string get_name() const {
|
std::string get_name() const {
|
||||||
std::vector<std::string> name_list;
|
std::vector<std::string> name_list;
|
||||||
|
if(pname.length() > 0)
|
||||||
|
name_list.push_back(pname);
|
||||||
for(const std::string& sname : snames)
|
for(const std::string& sname : snames)
|
||||||
name_list.push_back("-"+sname);
|
name_list.push_back("-"+sname);
|
||||||
for(const std::string& lname : lnames)
|
for(const std::string& lname : lnames)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user