Skip to content

fix(find): preserve native type defaults#3019

Open
ychampion wants to merge 1 commit into
rtk-ai:developfrom
ychampion:fix/find-native-type-default
Open

fix(find): preserve native type defaults#3019
ychampion wants to merge 1 commit into
rtk-ai:developfrom
ychampion:fix/find-native-type-default

Conversation

@ychampion

Copy link
Copy Markdown

Summary

  • Match both files and directories for native find syntax when -type is omitted.
  • Preserve RTK shorthand and explicit -type f / -type d behavior.

Why

Native find does not apply a type filter unless one is requested. RTK inherited its shorthand files-only default, so directory-only searches could silently return nothing.

Closes #3016.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --locked
  • cargo test --locked
  • cargo build --locked
  • Manual rtk find checks with omitted, file, and directory type filters

Native find syntax should match both files and directories unless a type predicate is explicitly supplied. Keep the RTK shorthand files-only default unchanged.

Constraint: Preserve existing RTK shorthand and explicit -type behavior.
Rejected: Changing the shared FindArgs default | It would alter shorthand semantics outside the reported bug.
Confidence: high
Scope-risk: narrow
Directive: Keep native and shorthand defaults separate unless the CLI contract changes.
Tested: cargo fmt --all -- --check; cargo clippy --all-targets --locked; cargo test --locked; cargo build --locked; focused find tests; manual CLI smoke
Signed-off-by: ychampion <ychampion@users.noreply.github.com>
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.

rtk find defaults to files-only without -type, silently dropping directory-only results

1 participant