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

Ordering of files/folders #101

Open
dylandhall opened this issue Aug 23, 2023 · 4 comments
Open

Ordering of files/folders #101

dylandhall opened this issue Aug 23, 2023 · 4 comments
Labels
feature New feature or request

Comments

@dylandhall
Copy link

dylandhall commented Aug 23, 2023

Looking in the code there's a comment suggesting the files/folders come pre-ordered from the OS but the ordering seems strange.

It seems to be alphabetical, but with all capital letters being ranked higher than lower case letters..

Powershell in windows:
image

Bash in ubuntu (WSL2):
image

At least it's consistent but it might be nice to optionally allow internal sorting, making it case insensitive.

Just to add to this, I'd also prefer to see folders above files, but that's a nice-to-have

@antonmedv
Copy link
Owner

We can add such option.

@antonmedv antonmedv added the feature New feature or request label Aug 27, 2023
@atb85
Copy link

atb85 commented Aug 27, 2023

We can add such option.
Hi @antonmedv, I have added this enhancement and submitted a PR.

@dylandhall
Copy link
Author

looks like the PR was closed without merge or comment?

@pcause
Copy link

pcause commented Aug 10, 2024

perhaps use the same command line switches that eza uses?? Allows users to easily switch or co-exist. here is the --sort option from the eza man page:

Which field to sort by.

Valid sort fields are name', Name', extension', Extension', size', modified', changed', accessed', created', inode', type', and none'.

The modified sort field has the aliases date', time', and newest', and its reverse order has the aliases age' and `oldest'.

Sort fields starting with a capital letter will sort uppercase before lowercase: A' then B' then a' then b'. Fields starting with a lowercase letter will mix them: A' then a' then B' then b'.

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

No branches or pull requests

4 participants