-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Env var should take precedence over config #1152
Comments
Thank you for reporting this.
Hm. Is this really the most common behavior of other command line programs? It does sound reasonable, but for some reason I thought it should be "environment variables < config file < command line arguments". But you might be right. |
He's right: the correct priority is "config files < env vars < command line flags" |
I believe you, but it would be great to see some actual examples. |
e.g. the man page for
The environment should always take priority over config files. Git is full of other examples of this. It makes sense if you think about it; config files are like global settings, env vars apply settings to the entire shell session, and command line args are per command settings. |
Ok, thank you. In this case, let's make the necessary changes (and add some tests!). I'm afraid the change might not be completely trivial though. |
Parses env configurations into matches (for those that can be configured via matches) instead of relying on dedicated env checks everywhere. Fixes sharkdp#1152
Parses env configurations into matches (for those that can be configured via matches) instead of relying on dedicated env checks everywhere. Fixes sharkdp#1152
Parses env configurations into matches (for those that can be configured via matches) instead of relying on dedicated env checks everywhere. Fixes sharkdp#1152
Parses env configurations into matches (for those that can be configured via matches) instead of relying on dedicated env checks everywhere. Fixes sharkdp#1152
If anyone wants to tackle this, make sure to also take a look at #1281. I am closing that PR now to make the PR inbox cleaner. |
Hello,
i would like to set a default theme in my bat config file, but override it occasionally with the BAT_THEME env var. Currently it seems that if the theme is set in the config then env is ignored. This seems wrong to me, i think env should take precedence over the config file (as would usually be the case to allow customisation per shell instance).
Thanks,
Bram
The text was updated successfully, but these errors were encountered: