-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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-files
option
#263
Comments
This is related to #152 but it subtly different. #152 is asking for deterministic output and you're asking for sorted output. What do you want to sort by? Should it be customizable? What do you hope for this to achieve that, say, |
@BurntSushi Hmmm. My bad. I don't care about sorting as much as I care about grouping by directory. So #152 seems more like what I'm looking for. E.g.
vs
Totally understand the performance penalty for grouping results. Is it feasible to use the parallel runners to do the searching and aggregate the results afterward? |
@nerdrew Well, I mean, yes, that's what a hypothetical solution would have to do. But now you've introduced a cost: extra memory use. There might be extra time cost too, for having to do the aggregate, but it could be immeasurable. Of course, that might have been feasible in 0.2.x, but 0.3.x introduced a parallel directory iterator so that actually crawling through the directories themselves is parallelized. Making that do aggregation (and importantly, knowing when an aggregation is complete) seems hard. I would say that there's basically two options here:
|
By the relative path name of the matching files; treat it as a string. Directory depth does not matter.
No, it should simply follow LC_COLLATE.
The output of normal
Yes. |
If |
Ack has it. I always want to receive sorted output because I then can easily cross-check by eye-balling and compare the list of search results with the output of
ls
ortree
, which are also sorted.The text was updated successfully, but these errors were encountered: