From aee35091f1e7c24e15aa1443c5d25c88ecf420e9 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 16 Mar 2017 22:19:53 -0700 Subject: [PATCH] Put the full help before the options Summary: This is more in line with "traditional" output from cli tools on *nix. Reviewed By: yfeldblum Differential Revision: D4719055 fbshipit-source-id: 2389a4a2a49f18d4b3d0257f68036f73f8fbc49e --- folly/experimental/NestedCommandLineApp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/experimental/NestedCommandLineApp.cpp b/folly/experimental/NestedCommandLineApp.cpp index a50374a9..8904f3c7 100644 --- a/folly/experimental/NestedCommandLineApp.cpp +++ b/folly/experimental/NestedCommandLineApp.cpp @@ -143,14 +143,14 @@ void NestedCommandLineApp::displayHelp( info.argStr.empty() ? "" : " ", info.argStr.c_str()); + printf("%s\n", info.fullHelp.c_str()); + std::cout << globalOptions_; if (!info.options.options().empty()) { printf("\n"); std::cout << info.options; } - - printf("\n%s\n", info.fullHelp.c_str()); } } -- 2.34.1