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

use os_sorted natsort with IGNORECASE #645

Merged
merged 1 commit into from Dec 21, 2023
Merged

Conversation

axu2
Copy link
Collaborator

@axu2 axu2 commented Dec 17, 2023

I was having issue with files in mixed casing, which File Explorer and Finder ignore.

Screenshot 2023-12-16 at 5 08 57 PM

image

https://natsort.readthedocs.io/en/stable/api.html#natsort.os_sorted

On Windows, it matches Windows File Explorer behavior.
On macOS without pyicu installed, it just does what natsort does while also ignoring extensions and ignoring case. The drawbacks of using it without pyicu seem to not matter in our case. pyicu isn't a simple pip install, so if I don't have to add it that's good.

@axu2 axu2 changed the title use os_sorted over natsorted IGNORECASE with os_sorted over natsorted Dec 17, 2023
@axu2 axu2 changed the title IGNORECASE with os_sorted over natsorted use os_sorted over natsorted with IGNORECASE Dec 17, 2023
@axu2 axu2 changed the title use os_sorted over natsorted with IGNORECASE use os_sorted natsort with IGNORECASE Dec 17, 2023
@axu2 axu2 merged commit a99c63a into ciromattia:master Dec 21, 2023
@axu2 axu2 deleted the os_sorted branch December 21, 2023 18:07
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.

"Natural" sort for files and folders
1 participant