Commit 1756910b authored by aligungr's avatar aligungr

CLI visual improvements

parent 1a668a53
......@@ -46,9 +46,13 @@ class OptionsHandler : public opt::IOptionsHandler
static std::string DumpCommands(const std::map<std::string, std::string> &descTable)
{
size_t maxLength = 0;
for (auto &item : descTable)
maxLength = std::max(maxLength, item.first.size());
std::stringstream ss{};
for (auto &item : descTable)
ss << item.first << " | " << item.second << "\n";
ss << item.first << std::string(maxLength - item.first.size(), ' ') << " | " << item.second << "\n";
std::string output = ss.str();
utils::Trim(output);
return output;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment