Expand description
Configuration file support for persistent settings.
This module provides support for loading configuration from a TOML file
located at ~/.config/clean-dev-dirs/config.toml (or the platform-specific
equivalent). Configuration file values serve as defaults that can be
overridden by CLI arguments.
§Layering
The precedence order is: CLI argument > config file > hardcoded default.
§Example config
project_type = "rust"
# Single directory (legacy):
# dir = "~/Projects"
# Multiple directories:
# dirs = ["~/Projects", "~/work/client"]
[filtering]
keep_size = "50MB"
keep_days = 7
sort = "size"
reverse = false
# name_pattern = "my-*"
[scanning]
threads = 4
verbose = true
skip = [".cargo", "vendor"]
ignore = [".git"]
max_depth = 5
[execution]
keep_executables = true
interactive = false
dry_run = false
use_trash = true # default; set to false for permanent deletionStructs§
- File
Config - Top-level configuration file structure.
- File
Execution Config - Execution options from the configuration file.
- File
Filter Config - Filtering options from the configuration file.
- File
Scan Config - Scanning options from the configuration file.
Functions§
- expand_
tilde - Expand a leading
~in a path to the user’s home directory.