From e1c6a4e5a3e68203b76a017273912c6b00bda089 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 30 Dec 2016 20:57:23 +0100 Subject: [PATCH] fix(command_line): End with empty line --- src/components/command_line.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/command_line.cpp b/src/components/command_line.cpp index e844eb1b..e7134503 100644 --- a/src/components/command_line.cpp +++ b/src/components/command_line.cpp @@ -25,7 +25,7 @@ cliparser::parser(string&& synopsis, const options&& opts) * Print application usage message */ void cliparser::usage() const { - std::cout << m_synopsis << "\n" << std::endl; + std::cout << m_synopsis << "\n\n"; // get the length of the longest string in the flag column // which is used to align the description fields @@ -48,7 +48,7 @@ void cliparser::usage() const { // output the list with accepted values if (!opt.values.empty()) { - std::cout << std::setw(pad + opt.desc.length()) << std::setfill(' ') << opt.desc << std::endl; + std::cout << std::setw(pad + opt.desc.length()) << std::setfill(' ') << opt.desc << '\n'; pad = pad + opt.flag_long.length() + opt.token.length() + 7; @@ -61,8 +61,10 @@ void cliparser::usage() const { std::cout << std::setw(pad + opt.desc.length()) << std::setfill(' ') << opt.desc; } - std::cout << std::endl; + std::cout << '\n'; } + + std::cout << std::endl; } /**