Skip to content

fix(icons): move directory-only names to DIRECTORY_ICONS - #153

Merged
fxrdhan merged 1 commit into
devfrom
fix/icons-directory-names
Oct 4, 2026
Merged

fxrdhan merged 1 commit into
devfrom
fix/icons-directory-names

Conversation

@fxrdhan

@fxrdhan fxrdhan commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

Moves .atom, .idea, .rvm, and .zsh_sessions from FILENAME_ICONS to DIRECTORY_ICONS.
In practice, these four names are always directories (JetBrains project metadata, Atom config directory, RVM install root, macOS Terminal session directory).
Previously, because icon_for_file() checks DIRECTORY_ICONS for directories and falls back to a generic folder icon, the dedicated icons for these four items were completely unreachable.

Type of Change

  • 🐛 Bug fix (non-breaking change fixing an issue)

Related Issues & Upstream References

How Has This Been Tested?

  • Unit tests: cargo test --lib output::icons (added test_dot_directory_icons_upstream_1940)
  • Integration tests: cargo test --test icons_theme_tests dot_directory_icons (added tests/icons_theme/dot_directory_icons.rs)
  • Manual verification: Verified with lez -1a --icons=always on .atom, .idea, .rvm, and .zsh_sessions directories
  • Lint and formatting: cargo clippy --all-targets --locked, cargo fmt --check, reuse pre-commit checks pass

Contributor Checklist

  • Base branch is set to dev
  • My commits follow Conventional Commits format
  • Tests covering the changes have been added/updated
  • cargo clippy --all-targets passes with no warnings
  • cargo fmt --check passes
  • License headers (SPDX / REUSE) are properly preserved/added

'.atom', '.idea', '.rvm', and '.zsh_sessions' were previously in
FILENAME_ICONS. Because icon_for_file() checks DIRECTORY_ICONS
first for directories and falls back to a generic folder glyph, their
dedicated glyphs were unreachable for real-world directories.

Move these four entries to DIRECTORY_ICONS and add unit and
integration tests.

Upstream: eza-community#1940, eza-community#1943
@fxrdhan
fxrdhan merged commit 26057ea into dev Oct 4, 2026
24 checks passed
@fxrdhan
fxrdhan deleted the fix/icons-directory-names branch October 4, 2026 07:56
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.

1 participant