-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Add --sort arg to CLI to sort by path/size/dates #1982
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
base: master
Are you sure you want to change the base?
Changes from 7 commits
2f5bd83
6511a2f
bbca886
d1364d1
b30e1b4
3663a3c
5196835
bf2435c
216b771
ba9cb06
ab55454
f1553f4
676be36
b62eb09
61bd00a
c861293
90e6539
86506ce
fee946e
88ca1a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| use clap::ValueEnum; | ||
|
|
||
| #[derive(Copy, Clone, PartialEq, Eq, Debug, ValueEnum)] | ||
| pub enum SortKey { | ||
| /// Sort by path | ||
| Path, | ||
| /// Sort by file size | ||
| Size, | ||
| /// Sort by creation time | ||
| Created, | ||
| /// Sort by modification time | ||
| Modified, | ||
| } |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This implementation requires sorting to be handled by every output path. That adds complexity and makes it harder to maintain. It would be better if there is some way we could avoid needing separate sorting logic for |
Uh oh!
There was an error while loading. Please reload this page.