Commit 9b31ef38d8dd7d5e8f0f7139d644a123deadfcb5

Authored by Henry Fredrick Schreiner
1 parent 87d83914

Adding positional name to name

Showing 1 changed file with 2 additions and 0 deletions
include/CLI/Option.hpp
... ... @@ -162,6 +162,8 @@ public:
162 162 /// Gets a , sep list of names. Does not include the positional name.
163 163 std::string get_name() const {
164 164 std::vector<std::string> name_list;
  165 + if(pname.length() > 0)
  166 + name_list.push_back(pname);
165 167 for(const std::string& sname : snames)
166 168 name_list.push_back("-"+sname);
167 169 for(const std::string& lname : lnames)
... ...