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

Implement -sort #58

Open
tavianator opened this issue Mar 21, 2020 · 0 comments
Open

Implement -sort #58

tavianator opened this issue Mar 21, 2020 · 0 comments

Comments

@tavianator
Copy link
Owner

-s will sort by name, but it would be nice to sort by other attributes like type, inode number, etc. The main difficulty is that at the time we sort, we don't have the struct BFTW available, so we either need to potentially compute those earlier and cache them for the later actual visits, or pass a different (lighter) type to the comparison function. But even with a lighter type for comparisons, determining the type/inode number may need a stat(), which should be cached somehow anyway.

It would be extra nice to support compound orderings like -sort type,-name meaning sort by type first, then name backwards.

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

No branches or pull requests

1 participant