Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case insensitive extension matching for icons & colors #908

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

desbma
Copy link
Contributor

@desbma desbma commented Aug 13, 2022

This changes the extension matching algorithm for icons & color selection to force lowercase search, effectively making it case insensitive.

I noticed that the icons & coloring where different for .jpg and .JPG files. For the icons I can generate a new ~/.config/lf/icons file with all extensions lowercase and uppercase but that is not ideal since it does not cover mixed case for example Jpg extension. For colors I use vivid to generate the LS_COLORS environement varibale, wich only generates lowercase extensions.

This change makes lf behavior in line with other programs I checked (I suspect they are many more):

  • GNU ls handling of LS_COLORS
  • lsd handling of LS_COLORS and icons
  • vivid

@lahwaacz
Copy link

There is #805 already which does it only for icons.

@desbma
Copy link
Contributor Author

desbma commented Aug 20, 2022

That's right, sorry I missed that.
I'm keeping this PR open though, because it makes sense to do the same for colors.

@gokcehan
Copy link
Owner

gokcehan commented Oct 1, 2022

@desbma Sorry for late reply and thanks for the patch.

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.

3 participants