-
-
Notifications
You must be signed in to change notification settings - Fork 725
feat: XDG config #2380
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
feat: XDG config #2380
Conversation
the docs now refer to one another and how the variables will override each other.
Regarding the code, and IMO how it should behave, the docs are wrong.
The local config file should override env variables, and that’s how it works now.
I just don’t want env vars from my |
That being said, I totally forgot about XDG config, and I love this! Good job! |
I don't see the distinction between a "local" file and one in the users home directory config. With a project path of
and they would all override one another with the more specific paths taking priority. I don't see why the one in
I can understand why the XDG config might be treated differently, but why not just have environment variables as the lowest priority then? I think its confusing to put env vars inbetween the two types of config in the priority order. Thinking about it, is there any particular reason we need environment variables at all? Why would you apply settings in an rc file when you could just define a config? |
Because a global env variable would take precedance over a config file located in the project (but See ⬇️ )
Here we are! If you ask me, now that we have proper config files, env vars aren’t really needed anymore. That would simplify both our codebase and the user experience. |
Ok, I think we're on the same page 👍
Since config files are new, I assume we would put |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed my two debug logs!
LGTM
Hi, and sorry I’m late to the party! Could I suggest (for another PR, but keeping this context) that we strip the initial dot in the Having a hidden file there only makes it harder to see it, and it is a common pattern. See for instance Thanks for Task as well as this PR!!! <3 |
Based on #2247
This takes the idea of having a config in
$HOME
and takes it further by:$XDG_CONFIG_HOME
instead of$HOME
$HOME
if its a parent).