Skip to content

find: match GNU prompt format for -ok/-okdir#699

Merged
hanbings merged 3 commits into
uutils:mainfrom
sylvestre:ok
Jun 5, 2026
Merged

find: match GNU prompt format for -ok/-okdir#699
hanbings merged 3 commits into
uutils:mainfrom
sylvestre:ok

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

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.

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.
@sylvestre sylvestre requested a review from hanbings June 4, 2026 19:24
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.83%. Comparing base (435f00d) to head (cbe5e88).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/find/matchers/exec.rs
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).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 hanbings merged commit a65160f into uutils:main Jun 5, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants