You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
find's diagnostics are answered by the generic parser and operand handling: unknown predicates report 'unrecognized option' or 'invalid option -- b', and -D / -ignore_readdir_race are treated as missing file operands #1380
Probe-verified (same-source mingw+Wine harness, two runs, GNU findutils 4.9.0). find's own argument language is not owned by find: unknown input is answered by the generic option parser or falls through to file-operand handling, so users get diagnostics for a different program than the one they ran.
find . -bogus → WinuxCmd: find: invalid option -- 'b' — the generic parser even bundles the predicate and blames its first letter. GNU: find: unknown predicate '-bogus'.
find -D tree . -name f → WinuxCmd: find: '-D': No such file or directory and find: 'tree': No such file or directory, exit 1 — -D is not recognized as a predicate at all and leaks into the path list. GNU: exit 0, evaluates, and prints the Predicate List / Eval Tree debug dump on stderr.
find . -ignore_readdir_race -name f → WinuxCmd: find: '-ignore_readdir_race': No such file or directory, exit 1. GNU: accepted (a positional option), results print.
find --debug . -name f → WinuxCmd: find: '--debug': No such file or directory. GNU: find: unknown predicate '--debug' — GNU find has no --debug long option; whatever the resolution, a missing-path error for an option-shaped token is the wrong diagnostic model.
Expected (GNU find)
Every token in predicate position is judged by find's own predicate table: known predicates (including the global/positional options -D, -ignore_readdir_race, -H/-L/-P/-O) take effect; anything else is an unknown predicate error from find itself.
Source
src/commands/find.cpp registers a hand-rolled predicate set but lets the shared parser (src/core/opt.cppm / dispatcher pre-passes) claim unknown --xxx tokens first, and unclaimed -x tokens fall into the operand list instead of an unknown-predicate error.
Regression seed
In-repo tests named with this issue number: the five probes above asserting diagnostic text, stream and exit code.
Fixed by #1400: unknown predicates are answered by find itself (find: unknown predicate '-zzz', verified on current main), and the global-option/start-point handling was reworked so parser diagnostics no longer swallow find's own operands. Regression pins issue_1380_* landed with the PR.
Activity
Merge pull request #1400 from unixwin/fix/winx5-find
caomengxuan666 commentedon Oct 27, 2026
Fixed by #1400: unknown predicates are answered by find itself (
find: unknown predicate '-zzz', verified on current main), and the global-option/start-point handling was reworked so parser diagnostics no longer swallow find's own operands. Regression pinsissue_1380_*landed with the PR.