-
-
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
Separate system and user config files #668
Comments
Sounds like a good idea to me! Thank you for the feedback. |
Adding a quick note for #659: This should probably be configurable by the package maintainer. |
I am very new to Rust, like very very new new. Can I try my hands on this if that's okay? |
Sure! Let us know if you need help |
Hi @sharkdp so, this how I am thinking of approaching this: I would just concatenate config read from |
@goku321 Yes, exactly. I think we should directly implement it with a list of possible paths to read from, in case there will be more (maybe OS-specific) paths in the future. |
You could use |
Is this issue still active? I can see #691 which was closed a while back. I'm keen to pick this up :) |
This is still active, yes. |
Should |
I would try to avoid introducing more environment variables, if possible. What do other CLI applications do? Is |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I propose that we use
This path is used both for Linux and macOS (so I agree with @eth-p that we need to include means to specify I am also a bit skeptical towards putting things in a When it comes to the Windows path, I don't have access to a machine to test on, but apparently
I do think we need to put some extra effort into getting this right, since what we end up with is likely to stay around as a maintenance/backwards compatibility commitment for a long time. CC @akinnane |
I planning to pick this up. But I have a major inquiry since I'm still very new to Rust and to open-source in general: What is |
There is now support for a systemwide config file. The location of the system wide config file is `$(BAT_SYSTEM_CONFIG_PREFIX)/bat/config`. `$(BAT_SYSTEM_CONFIG_PREFIX)` has to be provided at compile time as an environment variable. If the environment variable is not set, a default is used. This default is `C:` for windows and `/etc` for every other os. fixes sharkdp#668
I've implemented a first draft of this. The prefix can be specified at compile time via an I'm not 100% certain where to put this on windows though. |
There is now support for a systemwide config file. The location of the system wide config file is `$(BAT_SYSTEM_CONFIG_PREFIX)/bat/config`. `$(BAT_SYSTEM_CONFIG_PREFIX)` has to be provided at compile time as an environment variable. If the environment variable is not set, a default is used. This default is `C:\ProgramData` for windows and `/etc` for every other os. fixes sharkdp#668
There is now support for a systemwide config file. The location of the system wide config file is `$(BAT_SYSTEM_CONFIG_PREFIX)/bat/config`. `$(BAT_SYSTEM_CONFIG_PREFIX)` has to be provided at compile time as an environment variable. If the environment variable is not set, a default is used. This default is `C:\ProgramData` for windows and `/etc` for every other os.
Does this include support for |
I've been trying to export most of my dotfile-type configs to system packages I can install. A lot of programs offer the option for both a system and a user config (e.g. git reads from
/etc/gitconfig
, then~/.gitconfig
) although currently, bat reads just one file. It'd be nice if we could do something similar for bat as well, loading both/etc/bat/config
and~/.config/bat/config
.The text was updated successfully, but these errors were encountered: