Problem
Today find-replace always does both:
- Rewrites file contents containing the pattern
- Renames files and directories whose names contain the pattern
There's no way to scope to just one half. Users hit this when:
- Refactoring import paths where the filename happens to contain the same string but shouldn't be renamed (
--content-only)
- Reorganizing files by naming convention without touching contents (
--rename-only)
- Auditing the impact of one half before running the other
Proposed change
Add two mutually exclusive flags:
--content-only — rewrite file contents; do not rename any files or directories
--rename-only — rename files and directories; do not rewrite any contents
Default behavior is unchanged (both happen). Passing both flags is an error.
Acceptance
Problem
Today
find-replacealways does both:There's no way to scope to just one half. Users hit this when:
--content-only)--rename-only)Proposed change
Add two mutually exclusive flags:
--content-only— rewrite file contents; do not rename any files or directories--rename-only— rename files and directories; do not rewrite any contentsDefault behavior is unchanged (both happen). Passing both flags is an error.
Acceptance
--content-onlyskips the rename phase entirely--rename-onlyskips the content-rewrite phase entirely