[docs] Reformat -help output for help2man #13872

pull real-or-random wants to merge 1 commits into bitcoin:master from real-or-random:man-pages changing 4 files +14 −19
  1. real-or-random commented at 10:34 AM on August 4, 2018: member

    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.

    Before: screenshot from 2018-08-04 12-11-25 After: screenshot from 2018-08-04 12-11-46

  2. laanwj added the label Docs on Aug 4, 2018
  3. in src/bitcoin-cli.cpp:107 in fa15e5d97c outdated
     103 | @@ -104,14 +104,13 @@ static int AppInitRPC(int argc, char* argv[])
     104 |          return EXIT_FAILURE;
     105 |      }
     106 |      if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
     107 | -        std::string strUsage = strprintf("%s RPC client version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n";
     108 | +        std::string strUsage = PACKAGE_NAME "RPC client version " + FormatFullVersion() + "\n";
    


    laanwj commented at 11:44 AM on August 4, 2018:

    Won't this cause the strings to be joined without any spacing?


    real-or-random commented at 2:11 PM on August 4, 2018:

    Fixed with force push...

    Funnily, the missing space was even caught by CI: https://travis-ci.org/bitcoin/bitcoin/jobs/412055928#L3002

  4. laanwj commented at 11:45 AM on August 4, 2018: member

    This looks nice!

    Concept ACK

  5. real-or-random force-pushed on Aug 4, 2018
  6. [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.
    7272fdcfe7
  7. real-or-random force-pushed on Aug 4, 2018
  8. DrahtBot commented at 12:17 AM on August 5, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->Note to reviewers: This pull request conflicts with the following ones:

    • #13879 (doc: fixed bitcoin-cli --help output to compatibility with help2man by hebasto)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. hebasto commented at 8:54 AM on August 5, 2018: member

    There are conflicting pull requests:

    • this one introduces SYNOPSIS section to the all bitcoind, bitcoin-qt and utilities manual pages and, as a side effect, fixes one of two bugs in bitcoin-cli --help output;
    • #13879 fixes all found bugs in bitcoin-cli --help output and is safe for the whole code.

    So, #13879 can be merged regardless of this pull request.

  10. MarcoFalke commented at 5:04 PM on August 6, 2018: member

    utACK 7272fdcfe7

  11. laanwj commented at 8:32 AM on August 7, 2018: member

    tested ACK 7272fdcfe7370412b34a96bc19f3819e03169ef7

  12. laanwj merged this on Aug 7, 2018
  13. laanwj closed this on Aug 7, 2018

  14. laanwj referenced this in commit 37ab117a87 on Aug 7, 2018
  15. UdjinM6 referenced this in commit 89a0a1bcdf on Jun 30, 2021
  16. UdjinM6 referenced this in commit adee741085 on Jul 1, 2021
  17. UdjinM6 referenced this in commit a8ddba8cef on Jul 2, 2021
  18. UdjinM6 referenced this in commit 3c28aeefd8 on Jul 2, 2021
  19. random-zebra referenced this in commit e988d40e1f on Sep 6, 2021
  20. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me