A required-literal prefilter still sends matching multi-MB lines through RE2. When a top-level alternative is an exact literal, that literal already proves the line matches. Use that shortcut only when the output needs no match positions; retain RE2 for offsets, replacements, and other positional output.
Addresses #625. Draft until #626 lands: this branch contains #626 followed by one focused follow-up commit. Review the follow-up alone: https://github.com/asafyish/just-bash/compare/e8a5ccec2fef9f95179ac467038a1f3d74ddbbfb...codex/search-literal-alternatives-upstream
Validation: 89 search-engine and rg prefilter tests pass, plus TypeScript and banned-pattern checks. Tests cover Unicode case-folding and retaining RE2 where position-sensitive output requires it.
Activity
4This pull request is a draft
Merging is unavailable until it is marked ready for review.
@asafyish is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.