Opening this to ask before sending a PR, not sure it's wanted.
BatProjectDirs::new() (src/bin/bat/directories.rs) always uses etcetera's Windows strategy for the default config/cache dirs, which ignores XDG_CONFIG_HOME/XDG_CACHE_HOME even when they're set — that's what #3000 is hitting under MSYS2/Git Bash, where people often set XDG vars to keep dotfiles in one place. It's a compile-time choice in etcetera, not a bug in the crate.
bat already has BAT_CONFIG_DIR/BAT_CACHE_PATH as its own override for this exact situation. Would a PR that also checks XDG_CONFIG_HOME/XDG_CACHE_HOME on Windows before falling back to basedirs.config_dir()/cache_dir() be welcome? Same pattern, one more env var.
If not, I can just point #3000 at BAT_CONFIG_DIR and let it get closed.
Opening this to ask before sending a PR, not sure it's wanted.
BatProjectDirs::new()(src/bin/bat/directories.rs) always uses etcetera's Windows strategy for the default config/cache dirs, which ignoresXDG_CONFIG_HOME/XDG_CACHE_HOMEeven when they're set — that's what #3000 is hitting under MSYS2/Git Bash, where people often set XDG vars to keep dotfiles in one place. It's a compile-time choice in etcetera, not a bug in the crate.bat already has
BAT_CONFIG_DIR/BAT_CACHE_PATHas its own override for this exact situation. Would a PR that also checksXDG_CONFIG_HOME/XDG_CACHE_HOMEon Windows before falling back tobasedirs.config_dir()/cache_dir()be welcome? Same pattern, one more env var.If not, I can just point #3000 at
BAT_CONFIG_DIRand let it get closed.