Closed ghost closed 5 months ago
Also, euporie should exit with error in case of invalid config file option
It looks like I accidentally borked the scripts which generate the documentation for the configuration options and the command line flags with overzealous use of ruff
(here f61cb5acbc94a7bf4d849efc203a47340b93031f). I'll fix this.
Yes, the documentation could definitely be better in this regard - I'll try and add a better description of how the config file needs to be structured.
Euporie does already give detailed errors about invalid config files:
It doesn't throw any error in case the configuration option doesn't exist.
Take this file as an example:
{
"app": {
"edit_mode": "vi",
"line_numbers": false
},
"notebook": {
"edit_mode": "vi",
"line_numbers": true,
"autocomplete": false,
"autosuggest": false,
"autoinspect": false,
"log_file": "euporie.log",
"log_level": "debug",
"external_editor": "nvim",
"GIGIGIGIGI": "AAAAA"
}
}
I've made it so non-existent configuration items in the config file are ignored deliberately, to prevent users having to manually update their config files as options are added / removed between versions.
The list of all configuration options in the documentation is working again now: https://euporie.readthedocs.io/en/latest/pages/configuration.html
I've made it so non-existent configuration items in the config file are ignored deliberately, to prevent users having to manually update their config files as options are added / removed between versions.
Not even a warning?
I mean, not even a warning in stdout? A log entry?
Yes, I think a warning in the log is a good idea 👍
I've implemented log warnings on unrecognised configuration items in cbd2c73cc64d07bfa0146356f333ff8291c80f38, and it will be in the next release :robot:
--
at the start, (2) with-
in the middle substituted with_
(e.g. the--color-scheme
command line options becomes thecolor_scheme
config file option), and (3) command line options that don't take parameters are boolean options in the config file. I think we should write that.