From 9b31ef38d8dd7d5e8f0f7139d644a123deadfcb5 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 8 Feb 2017 15:01:46 -0500 Subject: [PATCH] Adding positional name to name --- include/CLI/Option.hpp | 2 ++ 1 file changed, 2 insertions(+) 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)