[GH-ISSUE #577] Honor XDG_CONFIG_HOME for config discovery #245

Open
opened 2026-06-08 11:26:18 +03:00 by zhus · 0 comments
Owner

Originally created by @ofek on GitHub (May 27, 2026).
Original GitHub issue: https://github.com/bootandy/dust/issues/577

The config file resolution currently looks for $HOME/.config/dust/config.toml and $HOME/.dust.toml, so users who set XDG_CONFIG_HOME need to pass --config manually. Please resolve the default config path via XDG e.g. ${XDG_CONFIG_HOME:-$HOME/.config}/dust/config.toml. Popular Rust crates like dirs, directories, and xdg already follow this behavior. I'd recommend the former for this code base via its config_dir function.

Originally created by @ofek on GitHub (May 27, 2026). Original GitHub issue: https://github.com/bootandy/dust/issues/577 The config file resolution currently looks for `$HOME/.config/dust/config.toml` and `$HOME/.dust.toml`, so users who set `XDG_CONFIG_HOME` need to pass `--config` manually. Please resolve the default config path via XDG e.g. `${XDG_CONFIG_HOME:-$HOME/.config}/dust/config.toml`. Popular Rust crates like `dirs`, `directories`, and `xdg` already follow this behavior. I'd recommend the former for this code base via its [config_dir](https://docs.rs/dirs/latest/dirs/fn.config_dir.html) function.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#245