Skip to content

Commit a77ad65

Browse files
Switch order of Usage and Description to make it UNIX standard
1 parent 3539bd1 commit a77ad65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: include/CLI/impl/Formatter_inl.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ CLI11_INLINE std::string Formatter::make_description(const App *app) const {
8989
desc += " \n[At most " + std::to_string(max_options) + " of the following options are allowed]";
9090
}
9191

92-
return (!desc.empty()) ? desc + "\n" : std::string{};
92+
return (!desc.empty()) ? desc + "\n\n" : std::string{};
9393
}
9494

9595
CLI11_INLINE std::string Formatter::make_usage(const App *app, std::string name) const {
@@ -164,9 +164,9 @@ CLI11_INLINE std::string Formatter::make_help(const App *app, std::string name,
164164
}
165165
}
166166

167-
out << make_usage(app, name);
168167
detail::streamOutAsParagraph(
169-
out, make_description(app), description_paragraph_width_, " "); // Format description as paragraph
168+
out, make_description(app), description_paragraph_width_, ""); // Format description as paragraph
169+
out << make_usage(app, name);
170170
out << make_positionals(app);
171171
out << make_groups(app, mode);
172172
out << make_subcommands(app, mode);

0 commit comments

Comments
 (0)