docs: Add config file docs to '-help' messages #14427

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20181004-help-config changing 4 files +33 −5
  1. hebasto commented at 5:19 PM on October 7, 2018: member

    This adds a suitable user documentation about configuration file.

    The bitcoin-qt -version output formatting has been fixed as well.

    Refs:

    Some small modifications made outputs of bitcoind and bitcoin-qt the same:

    cd ~/github/bitcoin/
    ./src/bitcoind -help > ~/bitcoind-help
    ./src/qt/bitcoin-qt -help > ~/bitcoinqt-help
    diff ~/bitcoind-help ~/bitcoinqt-help 
    1c1
    < Bitcoin Core Daemon version v0.17.99.0-6ca88a670
    ---
    > Bitcoin Core version v0.17.99.0-6ca88a670 (64-bit)
    3c3
    < Usage:  bitcoind [options]                     Start Bitcoin Core Daemon
    ---
    > Usage:  bitcoin-qt [command-line options]                     
    466a467,486
    > UI Options:
    > 
    >   -choosedatadir
    >        Choose data directory on startup (default: 0)
    > 
    >   -lang=<lang>
    >        Set language, for example "de_DE" (default: system locale)
    > 
    >   -min
    >        Start minimized
    > 
    >   -resetguisettings
    >        Reset all settings changed in the GUI
    > 
    >   -rootcertificates=<file>
    >        Set SSL root certificates for payment request (default: -system-)
    > 
    >   -splash
    >        Show splash screen on startup (default: 1)
    > 
    477c497
    < your favorite plain-text editor. By default, bitcoind will look for a file
    ---
    > your favorite plain-text editor. By default, bitcoin-qt will look for a file
    
    cd ~/github/bitcoin/
    ./src/bitcoind -version > ~/bitcoind-version
    ./src/qt/bitcoin-qt -version > ~/bitcoinqt-version
    diff ~/bitcoind-version ~/bitcoinqt-version
    1c1
    < Bitcoin Core Daemon version v0.17.99.0-6ca88a670
    ---
    > Bitcoin Core version v0.17.99.0-6ca88a670 (64-bit)
    

    And the output on GUI (menu -> Help -> Command-line options): screenshot from 2018-10-07 20-00-03

  2. Add config file docs to '-help' messages
    This adds a suitable user documentation about configuration file.
    
    The `bitcoin-qt -version` output formatting has been fixed as well.
    6ca88a6709
  3. DrahtBot commented at 6:44 PM on October 7, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->Reviewers, this pull request conflicts with the following ones:

    • #12557 ([WIP] 64 bit iOs device support by Sjors)

    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.

  4. fanquake added the label Docs on Oct 7, 2018
  5. in src/init.cpp:535 in 6ca88a6709
     527 | @@ -528,6 +528,22 @@ std::string LicenseInfo()
     528 |             "\n";
     529 |  }
     530 |  
     531 | +std::string ConfigHelp(const std::string& strBitcoinClient)
     532 | +{
     533 | +    return strprintf(_("All command-line options (except for '%s') may be specified in a configuration file, and all configuration file options may also be specified on the command line. "
     534 | +                       "Command-line options override values set in the configuration file."),
     535 | +               "-conf") +
    


    promag commented at 2:12 PM on October 8, 2018:

    inline -conf?


    hebasto commented at 4:47 PM on October 8, 2018:

    This is done on purpose to not translate a command line option.


    promag commented at 5:11 PM on October 8, 2018:

    Ah nice!

  6. in src/init.cpp:542 in 6ca88a6709
     537 | +           "\n" +
     538 | +           strprintf(_("The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '%s' character."), "#") +
     539 | +           "\n" +
     540 | +           "\n" +
     541 | +           strprintf(_("The configuration file is not automatically created; you can create it using your favorite plain-text editor. "
     542 | +                       "By default, %s will look for a file named '%s' in the %s data directory, but both the data directory and the configuration file path may be changed using the '%s' and '%s' command-line arguments."),
    


    promag commented at 2:13 PM on October 8, 2018:

    Could drop strBitcoinClient and make this By default a file named '%s' in the %s data director...?


    hebasto commented at 4:53 PM on October 8, 2018:

    This wording is quoted from BITCOIN.CONF(5). Why do you think the dropping strBitcoinClient out is preferable?


    promag commented at 5:11 PM on October 8, 2018:

    IMO it's independent of the binary so could drop it. Beside that manpage is from bitcoind package.

  7. promag commented at 2:21 PM on October 8, 2018: member

    I feel this doesn't belong to -help?

  8. hebasto commented at 4:57 PM on October 8, 2018: member

    @promag Thank you for your review.

    I feel this doesn't belong to -help?

    Which other piece of user documentation will be more suitable?

  9. promag commented at 5:20 PM on October 8, 2018: member

    @hebasto in my opinion -help should be short and easy to lookup. Having this every time sounds unnecessary.

  10. laanwj commented at 3:05 PM on October 18, 2018: member

    I too think this is overkill; like with other programs -help is for a quick overview of options, it doesn't need to document the config file syntax.

  11. hebasto commented at 3:16 PM on October 18, 2018: member

    Closing in favour of #14497.

  12. hebasto closed this on Oct 18, 2018

  13. hebasto deleted the branch on Oct 18, 2018
  14. laanwj referenced this in commit 6746a89519 on Oct 20, 2018
  15. PastaPastaPasta referenced this in commit 7644b0fa8e on Jun 27, 2021
  16. PastaPastaPasta referenced this in commit 1454380ea9 on Jun 28, 2021
  17. PastaPastaPasta referenced this in commit 931802b239 on Jun 29, 2021
  18. PastaPastaPasta referenced this in commit 8a9b3ff5f1 on Jul 1, 2021
  19. PastaPastaPasta referenced this in commit 868f071b9f on Jul 1, 2021
  20. PastaPastaPasta referenced this in commit 30cdf9c6f7 on Jul 1, 2021
  21. PastaPastaPasta referenced this in commit 787113a778 on Jul 3, 2021
  22. 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-13 21:15 UTC

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