Skip to content

feat(find): add -printf format flag support#637

Merged
chaliy merged 1 commit intomainfrom
claude/check-unix-tools-OSBId
Mar 15, 2026
Merged

feat(find): add -printf format flag support#637
chaliy merged 1 commit intomainfrom
claude/check-unix-tools-OSBId

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Mar 15, 2026

Summary

  • Add -printf format flag to the find builtin, closing feat(find): add -printf format flag support #633
  • Supported specifiers: %f (filename), %p (path), %P (relative), %s (size), %m (octal mode), %M (symbolic mode), %y (type), %d (depth), %T@ (mtime epoch)
  • Escape sequences: \n, \t, \0, \\
  • Implemented in both the interpreter-level execute_find and the builtin fallback path

Test plan

  • 5 new unit tests (test_find_printf_*) all pass
  • 5 new spec tests in find.test.sh all pass
  • Existing find tests (10) still pass
  • Full test suite green (cargo test --all-features)
  • cargo fmt --check clean
  • cargo clippy -- -D warnings clean

Closes #633

Support %f (filename), %p (path), %P (relative path), %s (size),
%m (octal mode), %M (symbolic mode), %y (type), %d (depth), %T@ (mtime),
and escape sequences \n, \t, \0, \\.
@chaliy chaliy merged commit a4d0ec0 into main Mar 15, 2026
23 checks passed
@chaliy chaliy deleted the claude/check-unix-tools-OSBId branch March 15, 2026 01:38
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.

feat(find): add -printf format flag support

1 participant