Skip to content

Redirect unsupported search scan options to find #4906

Description

@Widthdom

Summary

search --regex and search --all fail with only “remove the option,” although find is the supported literal/regex scan command.

Audit IDs: R-09. Reproduced with locally built cdidx v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a.

Existing issue relationship

Follow-up adjacent to closed #4574 and #4725's search/find diagnostics.

Expected behavior and PR scope

Return an actionable, safely quoted equivalent cdidx find suggestion where semantics can be preserved, without executing it. Keep search semantics unchanged.

Implementation guide for Codex 5.6 sol xhigh

  • Map only supported option combinations and state any non-equivalent flags explicitly.
  • Generate suggestions from normalized options with cross-shell-safe display/replay forms.
  • Provide typed JSON fields for alternative command/reason, not only prose.
  • Cover regex-like query text, option-shaped literals, paths/lang/include/exclude/limits, human/JSON, and unsafe quoting.
  • Add focused positive/negative regression tests, run the full net8.0 and net9.0 suite, and add the required bilingual changelog.d/unreleased/ fragment.

Acceptance criteria

  • The common mistakes point users to find.
  • Suggested commands preserve representable intent and never run automatically.
  • Unmappable cases explain the difference instead of giving a wrong command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codedocumentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions