Skip to content

fix(theme): honor XDG_CONFIG_HOME for theme lookup#1810

Open
ming-hao-xu wants to merge 1 commit into
eza-community:mainfrom
ming-hao-xu:fix-honor-xdg-config-home-for-theme
Open

fix(theme): honor XDG_CONFIG_HOME for theme lookup#1810
ming-hao-xu wants to merge 1 commit into
eza-community:mainfrom
ming-hao-xu:fix-honor-xdg-config-home-for-theme

Conversation

@ming-hao-xu

@ming-hao-xu ming-hao-xu commented May 23, 2026

Copy link
Copy Markdown
Description

Fixes #1224.

This updates theme lookup to use EZA_CONFIG_DIR first, then $XDG_CONFIG_HOME/eza when XDG_CONFIG_HOME is set to an absolute path, and finally the platform config directory as the fallback.

That keeps the platform-native fallback on macOS, while honoring an explicitly configured XDG_CONFIG_HOME for users who keep their eza config under ~/.config/eza.

This also fixes the default theme.yml branch to load the discovered file path instead of returning ThemeConfig::default(), matching the existing theme.yaml behavior.

How Has This Been Tested?

Reproduced the current macOS lookup behavior with temporary XDG_CONFIG_HOME and EZA_CONFIG_DIR directories using eza v0.23.4.

Added unit coverage for EZA_CONFIG_DIR, XDG_CONFIG_HOME, empty and relative XDG_CONFIG_HOME, and precedence.

CI covers the full formatting, lint, build, and test matrix on the PR.

@ming-hao-xu ming-hao-xu force-pushed the fix-honor-xdg-config-home-for-theme branch 4 times, most recently from 0c8e3fa to 0573016 Compare May 23, 2026 14:14
@ming-hao-xu ming-hao-xu force-pushed the fix-honor-xdg-config-home-for-theme branch from 0573016 to 33f4f36 Compare May 23, 2026 14:17
@ming-hao-xu

Copy link
Copy Markdown
Author

knock knock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: theme.yml doesn't work on macOS

1 participant