-
-
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
Open
DeflateAwning
wants to merge
20
commits into
sharkdp:master
Choose a base branch
from
DeflateAwning:feat-sort-arg
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2f5bd83
feat: Add --sort arg to CLI parsing
DeflateAwning 6511a2f
chore: Add sort_key to Config struct
DeflateAwning bbca886
feat: Connect --sort CLI arg to work with -x
DeflateAwning d1364d1
chore(deps): Add rand dev dependency for shuffling in tests
DeflateAwning b30e1b4
test: Add test_sort_by_path and _with_exec
DeflateAwning 3663a3c
docs: Add CHANGELOG entry
DeflateAwning 5196835
fix: Clippy suggestions
DeflateAwning bf2435c
refactor: Move SortKey enum to config.rs (review comment)
DeflateAwning 216b771
refactor,fix,test: Allow TestEnv configured to validate output order
DeflateAwning ba9cb06
perf,fix: Avoid collecting sorted results in batch if no sort required
DeflateAwning ab55454
Review suggestion - WorkerResult matching in sort - src/walk.rs
DeflateAwning f1553f4
fix: sort_worker_results error handling cases
DeflateAwning 676be36
perf: Optimize sort_worker_results for cached key lookup (fn and orde…
DeflateAwning b62eb09
refactor: Use --sort mechanism with printing (until buffer full)
DeflateAwning 61bd00a
refactor: Set max output buffer size in Config
DeflateAwning c861293
test: Create --sort=size test cases
DeflateAwning 90e6539
docs: Explain --sort CLI arg better with warning
DeflateAwning 86506ce
test: Add test_sort_by_size_with_exec_batch
DeflateAwning fee946e
fix: Clippy suggestions
DeflateAwning 88ca1a6
fix: Directory file size shows differently across platforms
DeflateAwning File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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
--exec,--exec-batch, and printing.