fix(icons): move directory-only names to DIRECTORY_ICONS - #153
Merged
Merged
Conversation
'.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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves
.atom,.idea,.rvm, and.zsh_sessionsfromFILENAME_ICONStoDIRECTORY_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()checksDIRECTORY_ICONSfor directories and falls back to a generic folder icon, the dedicated icons for these four items were completely unreachable.Type of Change
Related Issues & Upstream References
How Has This Been Tested?
cargo test --lib output::icons(addedtest_dot_directory_icons_upstream_1940)cargo test --test icons_theme_tests dot_directory_icons(addedtests/icons_theme/dot_directory_icons.rs)lez -1a --icons=alwayson.atom,.idea,.rvm, and.zsh_sessionsdirectoriescargo clippy --all-targets --locked,cargo fmt --check,reusepre-commit checks passContributor Checklist
devcargo clippy --all-targetspasses with no warningscargo fmt --checkpasses