-
Notifications
You must be signed in to change notification settings - Fork 2
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
Configuration File Support #47
Comments
Not sure I agree config files belong in the backtracking way parsing works with commander-cli |
Something that I have found to be very useful is being able to have cli arguments overpower with config file settings. |
I guess the way I'd include a config is by a path parameter or an environment variable, but maybe I'm missing something useful. Is there a good example where this was quite helpful? |
This isn't a great example but bitcoind allows for this behavior The conf file field can be superseded by the cli parameter |
Interesting, yeah I mean if there's a widely used tool that has that behavior I'm open to a patch to support it. |
I currently do not have a good design for this. Do you have any thoughts on the limited expressiveness of the state? The Parameter Sections #48 could be a solution for nested structures. |
I feel like there's a world where state is modular, I'd have to take a hack at it though. |
Thinking at this again, I feel like configuration files being part of backtracking might be likely to create confusion among newer users. |
It seems natural to allow intermixing of command line parameters and configuration file parameters.
I have not figured out a good way of implementing this yet but I have written a crude start. BebeSparkelSparkel@58ccaa7?diff=unified#diff-0fdf6337b7344d0659520693ed886d16bcaa1726b984e9a032da849ed05c61e7
One of the problems is that the structure and parsing work already completed to create
conf
is lost in the merge back toState
. One poor solution I have thought of is changingState
to something likewhich allows preparsed data to be passed through.
Do you have any thoughts on how to accomplish this?
The text was updated successfully, but these errors were encountered: