lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.05k stars 425 forks source link

Make .bak (backup) files have a regular file icon #910

Closed alichtman closed 11 months ago

alichtman commented 11 months ago

I think the right icon for these types of files is the icon for the filename without the ".bak" suffix.

But, this should be a quick improvement to the current implementation

 session_migration-ubuntu
 session_migration-ubuntu-wayland
 user-places.xbel
󰁯 user-places.xbel.bak
 user-places.xbel.tbcache
codecov-commenter commented 11 months ago

Codecov Report

Merging #910 (df53719) into master (949128f) will not change coverage. The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##           master     #910   +/-   ##
=======================================
  Coverage   85.75%   85.75%           
=======================================
  Files          51       51           
  Lines        5005     5005           
=======================================
  Hits         4292     4292           
  Misses        713      713           
Files Changed Coverage Δ
src/theme/icon.rs 100.00% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

zwpaper commented 11 months ago

hi @alichtman, thanks for contributing, but it seems reasonable that the bak file uses an icon to indicate that.

If you prefer to change it, you could try the icon theme.

alichtman commented 11 months ago

@zwpaper Right. I think you misunderstood my commit (since it does exactly what you suggest it should have done).

The file icon lsd uses for bak is currently unprintable with ligature fonts.

This commit makes it the generic file icon (which is printable).

Please take another look at the commit. Note that the commit summary will not render properly on GitHub mobile, due to a lack of ligature support.

zwpaper commented 11 months ago

Hi @alichtman, bak works as expected here, it would be related to the font you using, as I said, you could change it in the icon theme or pick a font with the icon:

image
alichtman commented 11 months ago

Huh, looks like the problem is on my end. Thanks for the response!