Closed shemishtamesh closed 1 year ago
Hi! Thank you for pointing it out about specification and the wrong order of checking for config. Could you kindly format your commit messages according to this (rebase and combine two commits) and capitalize your comment. Thank you for your contribution!
the comment starts with a name of a variable (default_dir), are you sure it should be capitalized? (and thus not reflect the actual name of the variable)
Yes, it shouldn't. I first didn't notice, than noticed, but forgot 😅
according to freedesktop.org's specifications: "If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.". this pull request would apply that specification.
also, the existing implementation of
src/config.rs
looks for the configuration file in the default directory before a specific (user defined) directory. I don't believe this was intentional. because having a default value for XDG_CONFIG_HOME would cause the code that looks for the configuration file in the specific directory to be unreachable, this pull request makes it so that the configuration is looked for in the specific directory, before the default one (and not after).