Support XDG directory spec on macOS by switching app_dirs2 to etcetera (#467)

Closes #311

Similar to how `bat` does it, we now have a global struct which holds
all the queried system directories. We prefer the XDG directories, but
use the "native" directories as a fallback. This should ensure that when
MacOs users upgrade from an older version, their existing config and
cache are still used. After deleting the old directories, the new ones
should be used by tealdeer automatically.
This commit is contained in:
Niklas Mohrin 2026-08-06 00:37:37 +02:00 committed by GitHub
commit 37b0dee39f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 83 additions and 75 deletions

View file

@ -12,7 +12,7 @@ repository = "https://github.com/tealdeer-rs/tealdeer/"
documentation = "https://tealdeer-rs.github.io/tealdeer/"
version = "1.8.1"
include = ["/src/**/*", "/tests/**/*", "/Cargo.toml", "/README.md", "/LICENSE-*", "/screenshot.png", "completion/*"]
rust-version = "1.85"
rust-version = "1.87" # MSRV
edition = "2021"
[[bin]]
@ -21,9 +21,9 @@ path = "src/main.rs"
[dependencies]
anyhow = "1"
app_dirs = { version = "2", package = "app_dirs2" }
clap = { version = "4", features = ["std", "derive", "help", "usage", "cargo", "error-context", "color", "wrap_help"], default-features = false }
env_logger = { version = "0.11", optional = true }
etcetera = "0.11.0"
log = "0.4"
serde = "1.0.21"
serde_derive = "1.0.21"