-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Should -X behavior match xargs? #441
Comments
Thank you for reporting this. I'm going to summarize from what I said in the linked ticket:
That being said, I don't really know why the order of |
I believe this can be explained by the buffering logic, specifically Line 231 in 5cbd840
|
Oh, of course. I completely forgot about this. If the search finishes within the buffering time (100 ms, by default), we actually sort the search results before printing them to the console. For |
Closed via #524 by @MarcoIeni and @crash-g. |
Released in fd 7.5.0 |
As discussed in this
bat
issue, the behavior offd
's-X
flag is different from the behavior offd | xargs
. My initial impression upon reading the docs was that-X
's behavior would be equivalent to piping toxargs
, and I was surprised when that wasn't the case.Shell session for reference:
In short, I would expect
-X
's order to be the order returned by a normal call tofd
(while I would expect-x
's order to be random because the docs make clear that operation is parallelized).The text was updated successfully, but these errors were encountered: