From 7272fdcfe7370412b34a96bc19f3819e03169ef7 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Tue, 8 May 2018 17:31:21 +0200 Subject: [docs] Reformat -help output for help2man This commit slightly changes the format of the "Usage" strings in CLI `-help` messages to meet the expection of the help2man tool, which we use to generate man pages. On the way, we remove a few calls to `strprintf()`, which became superficial after commit 32fbfda. --- src/bitcoin-cli.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/bitcoin-cli.cpp') diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index a77e3d49b..24a6dc23b 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -104,14 +104,13 @@ static int AppInitRPC(int argc, char* argv[]) return EXIT_FAILURE; } if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { - std::string strUsage = strprintf("%s RPC client version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n"; + std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n"; if (!gArgs.IsArgSet("-version")) { - strUsage += "\nUsage:\n" - " bitcoin-cli [options] [params] " + strprintf("Send command to %s", PACKAGE_NAME) + "\n" + - " bitcoin-cli [options] -named [name=value] ... " + strprintf("Send command to %s (with named arguments)", PACKAGE_NAME) + "\n" + - " bitcoin-cli [options] help List commands\n" + - " bitcoin-cli [options] help Get help for a command\n"; - + strUsage += "\n" + "Usage: bitcoin-cli [options] [params] Send command to " PACKAGE_NAME "\n" + "or: bitcoin-cli [options] -named [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n" + "or: bitcoin-cli [options] help List commands\n" + "or: bitcoin-cli [options] help Get help for a command\n"; strUsage += "\n" + gArgs.GetHelpMessage(); } -- cgit v1.2.3