Skip to content

docs: find-flavor compatibility design (POSIX/GNU/BSD union) - #148

Merged
helly25 merged 1 commit into
mainfrom
feat/find-flavors-design
Jun 27, 2026
Merged

docs: find-flavor compatibility design (POSIX/GNU/BSD union)#148
helly25 merged 1 commit into
mainfrom
feat/find-flavors-design

Conversation

@helly25

@helly25 helly25 commented Jun 27, 2026

Copy link
Copy Markdown
Owner

What

Records the design-of-record for xff's find-compatibility target, answering "which find do we target, and do we need more than one flavor?"

Decision: one permissive find style = POSIX (original) ∪ GNU ∪ BSD, not separate find-gnu/find-bsd flavors.

Why

  • xff already implements the union - it ships BSD's birthtime (-Bmin/-Btime) and GNU's -printf/-mmin/-regextype. Two strict flavors would mean retracting features from each.
  • The divergence is almost entirely additive (different spellings for similar capabilities), so the union is a strict superset and every GNU/BSD/POSIX script keeps working.
  • The find vs xff line is about xff inventions (-println, -capture, {field}, compound durations), not GNU-vs-BSD spelling.

Contents

  • Divergence survey table (probed against real /usr/bin/find BSD + GNU findutils; the dev-box find is bfs, a superset).
  • Resolutions for the few same-syntax-different-meaning conflicts (-type f,d, -perm +/-//, -size suffixes, regex flavor).
  • Settles the time-predicate gating: -mtime unit suffixes (-1h, +2d) are BSD-native -> find-compatible (not xff-gated); only compound durations on -mtime are xff-only.

Design-of-record for the rich time-comparison work (compound ParseTimeString + -mtime unit suffixes) that follows in stacked PRs.

Records the decision that xff's find style targets the UNION of POSIX,
GNU, and BSD find (not separate find-gnu/find-bsd flavors): the
divergence is almost entirely additive spellings, and xff already ships
the union (BSD birthtime + GNU printf/mmin). Surveys the real
divergences, resolves the few same-syntax-different-meaning conflicts
toward the most-capable reading, and settles the time-predicate gating:
-mtime unit suffixes are BSD-native (find-compatible), only compound
durations on -mtime are xff-only.
@helly25
helly25 merged commit 3bcfdd0 into main Jun 27, 2026
8 checks passed
@helly25
helly25 deleted the feat/find-flavors-design branch June 27, 2026 17:01
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.

1 participant