diff --git a/include/CLI/Option.hpp b/include/CLI/Option.hpp index 742da56f..23a6282b 100644 --- a/include/CLI/Option.hpp +++ b/include/CLI/Option.hpp @@ -162,6 +162,8 @@ public: /// Gets a , sep list of names. Does not include the positional name. std::string get_name() const { std::vector name_list; + if(pname.length() > 0) + name_list.push_back(pname); for(const std::string& sname : snames) name_list.push_back("-"+sname); for(const std::string& lname : lnames)