find: match GNU prompt format for -ok/-okdir#699
Merged
Conversation
The -ok/-okdir prompt rendered the full substituted command, but GNU find prints a fixed, abbreviated form: "< executable ... pathname > ? " (literal ..., a space before ?, and always the full entry path even for -okdir). Match it exactly and update the prompt-format test. Verified byte-for-byte against GNU findutils 4.10.0.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #699 +/- ##
==========================================
- Coverage 91.85% 91.83% -0.02%
==========================================
Files 31 31
Lines 6420 6408 -12
Branches 338 338
==========================================
- Hits 5897 5885 -12
Misses 397 397
Partials 126 126 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hanbings
reviewed
Jun 4, 2026
Comment on lines
+86
to
+90
| // GNU find prints a fixed, abbreviated prompt of the form | ||
| // "< executable ... pathname > ? ". It does not render the | ||
| // substituted argument list, and always shows the full path of | ||
| // the entry being processed (even for -okdir, whose command runs | ||
| // with the "./basename" form). |
Collaborator
There was a problem hiding this comment.
to my eyes, GNU's approach hides some of the detail, and I personally lean a little towards uutils's (even if its current implementation isn't all that polished) behavior of printing the full command. That said, I realize this might come at the cost of compatibility, so I'm honestly not sure
hanbings
approved these changes
Jun 4, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The -ok/-okdir prompt rendered the full substituted command, but GNU find prints a fixed, abbreviated form: "< executable ... pathname > ? " (literal ..., a space before ?, and always the full entry path even for -okdir). Match it exactly and update the prompt-format test.