From: Brian Smith Date: Fri, 17 Mar 2017 05:19:53 +0000 (-0700) Subject: Put the full help before the options X-Git-Tag: v2017.03.20.00~2 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=aee35091f1e7c24e15aa1443c5d25c88ecf420e9 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 --- 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()); } }