-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
utils and libraries: Allow values quoting in config files #14370
Conversation
Doesn't the path with spaces in it work without quotes? |
Yes, it works. |
I didn't catch it. Can you provide a use case? |
Concept ACK Seems like a nice usability improvement |
This is a breaking change with previous versions? In any case, this needs extensive release notes documentation or update the documentation of our config file parser. (Not sure if we have that user documentation already) |
If someone is using a weird path |
@MarcoFalke
#14427 addressed to your concerns about user documentation. Would you mind to review it? |
@ken2812221
My bad. I'm going to fix it. |
1f43dcd
to
dd5dcd4
Compare
@ken2812221 |
I think it's better for config file parser to either:
than to do what this PR does and try to make config file quoting vaguely resemble posix shell quoting and windows msvcrt command line quoting without actually implementing either scheme. |
The config file values can be surrounded by quotation marks. This allows for explicit using of whitespaces (e.g. in paths).
dd5dcd4
to
7bc6de6
Compare
@ryanofsky
Agree. Done. Please re-review. |
Concept ACK. This is much better. Also the use can specify any characters that it wants. |
This needs tests before merge. |
I've modified the src/test/util_tests.cpp unit tests. Should this patch be placed in this PR? |
i'm not sure this is worth it
|
Especially in, for example, an |
yes, there is plenty of tooling/scripting that assumes you can just dump a value after (edit: although arguably, #13143 already complicates this, and provides a use-case for quoting maybe?!) |
Closing in favor of #14497 |
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - #14370 - #14427 - #14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - bitcoin#14370 - bitcoin#14427 - bitcoin#14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - bitcoin#14370 - bitcoin#14427 - bitcoin#14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - bitcoin#14370 - bitcoin#14427 - bitcoin#14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - bitcoin#14370 - bitcoin#14427 - bitcoin#14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - bitcoin#14370 - bitcoin#14427 - bitcoin#14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - bitcoin#14370 - bitcoin#14427 - bitcoin#14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
1fb3c16 Add `doc/bitcoin-conf.md` (Hennadii Stepanov) Pull request description: From the IRC: > 2018-10-16T05:35:03 \<wumpus\> if something can be solved by better documentation, please work on documentation! > 2018-10-16T05:35:12 \<wumpus\> don't change the code instead Refs: - bitcoin#14370 - bitcoin#14427 - bitcoin#14494 Based on the BITCOIN.CONF(5) manual page written by Micah Anderson \<micah@debian.org\> for the Debian system. Tree-SHA512: 16393c9073c027fa1c46f8b59651e60b9a3159b3aeb9b3102040c292d2787f32b1ead5977957ac3ac0759a4bf626650a2325b68ad84320964ac089ffc2d3b4f4
The using double quotes to quote command line option values with spaces(e.g. paths) is allowed on all platforms. Options in config files are
handled in the same way now.
The config file values can be surrounded by quotation marks. This allows
for explicit using of whitespaces (e.g. in paths).