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

[Feature request]: file sorting with name #1879

Open
og900aero opened this issue Jan 2, 2025 · 2 comments
Open

[Feature request]: file sorting with name #1879

og900aero opened this issue Jan 2, 2025 · 2 comments

Comments

@og900aero
Copy link

og900aero commented Jan 2, 2025

I noticed an interesting fact. I have the following files when I list them with eza in the terminal, or other file management programs:

.rw-r--r-- 108k shyciii shyciii 5 Dec 2017 'Mekk Elek.jpg'
.rw-r--r-- 108k shyciii shyciii 22 Dec 2024 'Mekk Elek 2.jpg'
.rw-r--r-- 307k shyciii shyciii 30 Jun 2018 'Mekk Elek 3.gif'
.rw-r--r-- 338k shyciii shyciii 30 Jun 2018 'Mekk Elek 4.gif'
.rw-r--r-- 202k shyciii shyciii 17 Oct 2022 'Mekk Elek 5.gif'

But under lf it sorts like this:

.rw-r--r-- 108k shyciii shyciii 22 Dec 2024 'Mekk Elek 2.jpg'
.rw-r--r-- 307k shyciii shyciii 30 Jun 2018 'Mekk Elek 3.gif'
.rw-r--r-- 338k shyciii shyciii 30 Jun 2018 'Mekk Elek 4.gif'
.rw-r--r-- 202k shyciii shyciii 17 Oct 2022 'Mekk Elek 5.gif'
.rw-r--r-- 108k shyciii shyciii 5 Dec 2017 'Mekk Elek.jpg'

Would be great solutions like eza:
eza -lahg --color=always --group-directories-first --sort=name

@joelim-work
Copy link
Collaborator

This is because Mekk Elek.jpg actually comes after Mekk Elek 2.jpg alphabetically in terms of ASCII (dot comes after space).

Sorting purely by basename (i.e. without considering the extension) probably falls under the category of a feature request. But in the meantime you can try replacing spaces in the filename with underscore (e.g. Mekk_Elek.jpg and Mekk_Elek_2.jpg).

@og900aero
Copy link
Author

This is because Mekk Elek.jpg actually comes after Mekk Elek 2.jpg alphabetically in terms of ASCII (dot comes after space).

Sorting purely by basename (i.e. without considering the extension) probably falls under the category of a feature request. But in the meantime you can try replacing spaces in the filename with underscore (e.g. Mekk_Elek.jpg and Mekk_Elek_2.jpg).

Ok. I modified subject. Thx.

@og900aero og900aero changed the title Strange file sorting [Feature request]: file sorting with name Jan 3, 2025
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

No branches or pull requests

2 participants