Bat: Separate system and user config files

Created on 21 Sep 2019  路  11Comments  路  Source: sharkdp/bat

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.

feature-request good first issue

Most helpful comment

Hi @sharkdp so, this how I am thinking of approaching this: I would just concatenate config read from /etc/bat/config and ~/.config/bat/config together

You could use bat to concatenate those files, right ? 馃槈

All 11 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 /etc/bat/config and ~/.config/bat/config together

@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.

Hi @sharkdp so, this how I am thinking of approaching this: I would just concatenate config read from /etc/bat/config and ~/.config/bat/config together

You could use bat to concatenate those files, right ? 馃槈

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 /etc/bat/config be static or should we expose an env var to override that also?

I would try to avoid introducing more environment variables, if possible. What do other CLI applications do? Is /etc/bat/config a reasonable place for a system-wide bat config?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomgoren picture tomgoren  路  3Comments

tbsvttr picture tbsvttr  路  3Comments

samuelcolvin picture samuelcolvin  路  3Comments

yum-feng picture yum-feng  路  3Comments

issmirnov picture issmirnov  路  3Comments