docs: fixed bitcoin-cli -help output for help2man #13905

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:bitcoin-cli-help2man-rebased changing 1 files +2 −2
  1. hebasto commented at 6:52 PM on August 7, 2018: member

    Currently bitcon-cli -help output forces help2man to produce .TP and .IP commands instead of a single .IP command for -stdinrpcpass option. Removing an extra space fixes this issue.

    This pull request is rebased from #13879

  2. in src/bitcoin-cli.cpp:52 in 8873d50603 outdated
      49 | @@ -50,7 +50,7 @@ static void SetupCliArgs()
      50 |      gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, OptionsCategory::OPTIONS);
      51 |      gArgs.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to bitcoind)", false, OptionsCategory::OPTIONS);
      52 |      gArgs.AddArg("-stdin", "Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases).  When combined with -stdinrpcpass, the first line from standard input is used for the RPC password.", false, OptionsCategory::OPTIONS);
    


    MarcoFalke commented at 7:00 PM on August 7, 2018:

    There is a . in this line as well. What makes it work here and not below?


    hebasto commented at 7:21 PM on August 7, 2018:

    You're right (and I didn't catch it). But somehow help2man parses badly only the second line.


    hebasto commented at 9:03 PM on August 7, 2018:

    @MarcoFalke more precisely: the FormatParagraph call makes -stdin option output without two spaces between words; that's why help2man parses it without any issue.

  3. MarcoFalke commented at 7:01 PM on August 7, 2018: member

    For future reference: Note that you can just git push with --force as flag to avoid having to reopen the pull request.

  4. hebasto commented at 8:06 PM on August 7, 2018: member

    Thanks to @MarcoFalke it is obviously bug was caused by combination a redundant strprintf call with an extra space. Both are fixed with force push.

  5. DrahtBot commented at 8:09 PM on August 7, 2018: member

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

    • #13716 (bitcoin-cli: -stdinwalletpassphrase and non-echo stdin passwords by kallewoof)

    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.

  6. fanquake added the label Docs on Aug 8, 2018
  7. laanwj commented at 8:08 AM on August 8, 2018: member

    This pull request is rebased from #13879

    Yes, please don't open new PRs for the same thing, but force-push to the old one. Otherwise it splits the discussion over a whole trail of PRs which doesn't make things easier for maintainers.

  8. hebasto commented at 12:55 PM on August 8, 2018: member

    @MarcoFalke, @laanwj

    Yes, please don't open new PRs for the same thing, but force-push to the old one. Otherwise it splits the discussion over a whole trail of PRs which doesn't make things easier for maintainers.

    Yes, I will follow the rules. I beg your pardon.

  9. MarcoFalke commented at 9:41 PM on August 12, 2018: member

    Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits

    (Might as well do a rebase, since there wasn't any review yet)

  10. docs: fixed bitcoin-cli -help output for help2man
    The `help2man` parses a string containing two spaces between words with an issue:
    it gives out `.TP` and `.IP` commands instead of a single `.IP` command.
    Removing an extra space fixes this issue.
    Currently the `-help` output for the `-stdin` option looks without any issue due to eliminating
    of two spaces between words by a `FormatParagraph` call for this particular case.
    For consistency and preventing from future regressions extra spaces have been removed from the both lines.
    The redundant `strprintf` call has been removed aswell.
    869193f5a6
  11. hebasto force-pushed on Aug 13, 2018
  12. fanquake commented at 10:29 AM on August 13, 2018: member

    Output generated using help2man src/bitcoin-cli.

    master (2115cba):

    \fB\-stdinrpcpass\fR
    .TP
    Read RPC password from standard input as a single line.
    When combined
    .IP
    with \fB\-stdin\fR, the first line from standard input is used for the
    RPC password.
    .HP
    
    

    This PR (869193f):

    \fB\-stdinrpcpass\fR
    .IP
    Read RPC password from standard input as a single line. When combined
    with \fB\-stdin\fR, the first line from standard input is used for the
    RPC password.
    .HP
    
  13. hebasto commented at 10:52 AM on August 13, 2018: member
  14. MarcoFalke commented at 11:04 AM on August 13, 2018: member

    Diff looks good. ACK 869193f5a6398bb9e4a6f4a7aeb8d2203193c80f

    diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1
    index 1da4c3aa03..639cc93f4c 100644
    --- a/doc/man/bitcoin-cli.1
    +++ b/doc/man/bitcoin-cli.1
    @@ -75,27 +75,25 @@ Wait for RPC server to start
     .HP
     \fB\-rpcwallet=\fR<walletname>
     .IP
     Send RPC for non\-default wallet on RPC server (needs to exactly match
     corresponding \fB\-wallet\fR option passed to bitcoind)
     .HP
     \fB\-stdin\fR
     .IP
     Read extra arguments from standard input, one per line until EOF/Ctrl\-D
    -(recommended for sensitive information such as passphrases).
    -When combined with \fB\-stdinrpcpass\fR, the first line from standard
    -input is used for the RPC password.
    +(recommended for sensitive information such as passphrases). When
    +combined with \fB\-stdinrpcpass\fR, the first line from standard input
    +is used for the RPC password.
     .HP
     \fB\-stdinrpcpass\fR
    -.TP
    -Read RPC password from standard input as a single line.
    -When combined
     .IP
    +Read RPC password from standard input as a single line. When combined
     with \fB\-stdin\fR, the first line from standard input is used for the
     RPC password.
     .HP
     \fB\-version\fR
     .IP
     Print version and exit
     .PP
     Chain selection options:
     .HP
    
  15. ken2812221 referenced this in commit 73a09b4458 on Aug 13, 2018
  16. MarcoFalke merged this on Aug 13, 2018
  17. MarcoFalke closed this on Aug 13, 2018

  18. hebasto deleted the branch on Aug 13, 2018
  19. jasonbcox referenced this in commit d4280f43d3 on Oct 25, 2020
  20. PastaPastaPasta referenced this in commit e01a87da69 on Jun 27, 2021
  21. PastaPastaPasta referenced this in commit 959dd4dfb8 on Jun 28, 2021
  22. PastaPastaPasta referenced this in commit 3a8c1a06a7 on Jun 29, 2021
  23. PastaPastaPasta referenced this in commit 8c7a9d298f on Jun 29, 2021
  24. PastaPastaPasta referenced this in commit ec397cdf67 on Jun 29, 2021
  25. PastaPastaPasta referenced this in commit 4dc7003017 on Jun 29, 2021
  26. PastaPastaPasta referenced this in commit 08835d37c8 on Jun 29, 2021
  27. MarcoFalke 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