-
Notifications
You must be signed in to change notification settings - Fork 2
Support XDG Base Directory Specification for configuration files #197
Copy link
Copy link
Open
Description
Description
I suggest extending the genericcli/context module to support the XDG Base Directory Specification.
Currently, configuration files are loaded from a hardcoded directory in the user's home if no --config flag is given (e.g., ~/.metalctl/config.yaml). To align with modern Linux standards and keep home directories clean, the config loader should prioritize the following lookup order:
-
XDG config path:
$XDG_CONFIG_HOME/<app_name>/config.yaml
(defaults to~/.config/<app_name>/config.yamlif the environment variable is unset). -
Legacy path:
~/.<app_name>/config.yaml
(for backward compatibility).
This change ensures compliance with the standard while keeping existing setups functional.
Note: needs #194 to be merged first.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status