-
Notifications
You must be signed in to change notification settings - Fork 38.7k
docs: fixed bitcoin-cli -help output for help2man #13905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/bitcoin-cli.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a . in this line as well. What makes it work here and not below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right (and I didn't catch it). But somehow help2man parses badly only the second line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarcoFalke more precisely: the FormatParagraph call makes -stdin option output without two spaces between words; that's why help2man parses it without any issue.
|
For future reference: Note that you can just git push with |
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
src/bitcoin-cli.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right (and I didn't catch it). But somehow help2man parses badly only the second line.
Note to reviewers: This pull request conflicts with the following ones:
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. |
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. |
|
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) |
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.
e5bd007 to
869193f
Compare
|
Output generated using master (2115cba): This PR (869193f): |
Done. |
|
Diff looks good. ACK 869193f 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 |
Summary: This includes a sentence in the documentation of `-stdin` that was missed while backporting [[bitcoin/bitcoin#10997 | PR10997]] (D1042), and the removal of a redundant `strprintf`. The double space was already removed in D3058. This is a backport of Core [[bitcoin/bitcoin#13905 | PR13905]] Test Plan: `ninja && ninja check` `bitcoin-cli -help` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D8105
869193f docs: fixed bitcoin-cli -help output for help2man (Hennadii Stepanov) Pull request description: 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 bitcoin#13879 Tree-SHA512: 1c5b25ed2ef7b7de42bc6210165bdbabe63f045699487f2db4790e0d3176f6493dfd3e8e19f4ddc38b551539465d7b41aea570f20dccbc0609f00fdfee1b5180
Currently
bitcon-cli -helpoutput forces help2man to produce.TPand.IPcommands instead of a single.IPcommand for-stdinrpcpassoption.Removing an extra space fixes this issue.
This pull request is rebased from #13879