-
-
Notifications
You must be signed in to change notification settings - Fork 626
feat: add sort_by option to sort files by modification time #1040
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
Conversation
I created separate functions for sorting by name or modification time. I also made it pull the modification time in the builders instead of the comparator. This looks cleaner and should ensure each node calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost good, some code smell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, nice feature. would be nice to add a toggle action for this too :)
@kyazdani42 This option sorts by the last modified files. I want the opposite, is there any option for it? like showing last modified files/dirs at the end So files/dirs which were created first will be shown first and the latest files/dirs at last.
There could be two options for this ( the modified_time_new is the current one ) |
That's pretty specific. We could be more generic with something like |
i doubt if The current or |
Please raise a feature request, with a PR gratefully appreciated.
|
…e#1040) Co-authored-by: Brandon Dwiel <bdwiel@apple.com>
Fixes #1039 for files only. I'll wait for feedback on whether you like this feature or not before investigating why it's not working on directories. I was thinking that directories will always be sorted above files at the same level. So for each node, show
sorted(directories)
followed bysorted(files/symlinks)
. What do you think?