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

fix: ignore extensions for directories when sorting #1418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sdht0
Copy link

@sdht0 sdht0 commented Mar 14, 2025

Before this patch:

$ mkdir test1 test2 abc 01.city 02.apple
$ touch a.txt abc.txt abc.mp3 ab

$ eza                                       
01.city  02.apple  a.txt  ab  abc  abc.mp3  abc.txt  test1  test2

$ eza --sort=extension                      
ab  abc  test1  test2  02.apple  01.city  abc.mp3  a.txt  abc.txt

$ eza --sort=extension --group-directories-first
abc  test1  test2  02.apple  01.city  ab  abc.mp3  a.txt  abc.txt

Note how 01.city is sorted after 02.apple when sorting by extension.

After patch:

$ eza --sort=extension
01.city  02.apple  ab  abc  test1  test2  abc.mp3  a.txt  abc.txt

$ eza --sort=extension --group-directories-first
01.city  02.apple  abc  test1  test2  ab  abc.mp3  a.txt  abc.txt

Directories are treated exactly as if there are no . was found in the name.

Closes #821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

feat: don't consider "extensions" for directories when sorting
1 participant