You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug or a feature request, but I'll go with bug since there's at least some documentation.
CHANGELOG.md states:
CHANGELOG.md-754-## Changes
CHANGELOG.md-755-
CHANGELOG.md:756:- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to
CHANGELOG.md-757- the default themes (they may also override), see #172
This value $BAT_CONFIG_DIR is not respected in directories.rs, only $XDG_CONFIG_HOME and $HOME are.
There are no references to BAT_CONFIG_DIR anywhere in the source except the changelog. It looks like it used to be documented, but was never implemented. Documentation was removed in d3d795f and other commits.
It would be nice to see support for BAT_CONFIG_DIR in directories.rs. This makes it easier for tools to ship custom bat themes / configs / caches, without overriding $XDG_CONFIG_HOME.
What did you expect to happen instead?
I should be able to specify $BAT_CONFIG_DIR.
How did you install bat?
brew install bat
bat version and environment
$ bat --version
bat 0.18.1
The text was updated successfully, but these errors were encountered:
I think you are looking for BAT_CONFIG_PATH, which is also mentioned in the README. The commit you are referring to removed BAT_CONFIG_DIR from a README code snippet. It was never used in bat internally.
The CHANGELOG entry you are referring to is misleading though, I agree. It's a historical artifact that refers to the README entry at the time. We could change that to read BAT_CONFIG_PATH, I guess.
As far as I can tell, BAT_CONFIG_PATH is a file, not a directory containing e.g. a themes subdirectory.
$ BAT_CONFIG_PATH=/tmp/bat-cache-bug bat --diagnostic
...
#### Config file
Could not read contents of '/tmp/bat-cache-bug': Is a directory (os error 21).
You are absolutely right. BAT_CONFIG_PATH, if set, is the position of the config file. Additional themes, so far, will always be loaded from BatProjectDirs::config_dir(), which - on Linux - is either $XDG_CONFIG_HOME/bat or $HOME/.config/bat.
I'd be okay with introducing BAT_CONFIG_DIR for this (in analogy to BAT_CACHE_DIR). Precedence for the config file should then probably be:
Describe the bug you encountered:
Not sure if this is a bug or a feature request, but I'll go with bug since there's at least some documentation.
CHANGELOG.md states:
This value
$BAT_CONFIG_DIR
is not respected indirectories.rs
, only$XDG_CONFIG_HOME
and$HOME
are.There are no references to
BAT_CONFIG_DIR
anywhere in the source except the changelog. It looks like it used to be documented, but was never implemented. Documentation was removed in d3d795f and other commits.It would be nice to see support for
BAT_CONFIG_DIR
indirectories.rs
. This makes it easier for tools to ship custom bat themes / configs / caches, without overriding$XDG_CONFIG_HOME
.What did you expect to happen instead?
I should be able to specify
$BAT_CONFIG_DIR
.How did you install
bat
?brew install bat
bat version and environment
The text was updated successfully, but these errors were encountered: