ITADN

feat: add configuration variable to clear default styles in `theme.yml`

#1724Opennamurphy 创建于 2026-02-19
N
namurphycommented
## Proposed change Add a configuration variable to `theme.yml` to clear default styles, while still letting the `EZA_COLORS` and `LS_COLORS` environment variables take precedence. Thank you to @martenlienen for [this comment](https://github.com/eza-community/eza/pull/1718#issuecomment-3925036812) that inspired this issue! ## Description Currently, setting the environment variable `EZA_COLORS` to `reset` is intended to clear the default styles (with a fix pending in #1718). However, mixing `EZA_COLORS=reset` and `theme.yml` would likely make the resulting configurations confusing. Being able to define a specific variable in `theme.yml` to clear default styles would be a much cleaner way to perform this reset. The `EZA_COLORS` and `LS_COLORS` environment variables [take precedence](https://github.com/eza-community/eza-themes/?tab=readme-ov-file#environment-variables) over `theme.yml`. Thus, the configuration variable should clear only the default styles and not the styles defined in `EZA_COLORS` or `LS_COLORS`. I'd be inclined to name the configuration variable something like `clear_default_styles` (defaulting to `false`) to reduce the chance of ambiguity. 🤔 It seems worthwhile to include some tests to make sure that `EZA_COLORS` and `LS_COLORS` take precedence. ## Related issues This issue follows up on #1718, and is a sub-issue for #731. Thank you to everyone for working on this wonderful project! It's making me want to learn Rust so that I can contribute. 🦀
0 条评论