[PR #2218] Grep: use rg --json #10243

Closed
opened 2026-02-16 18:14:51 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/2218

State: closed
Merged: No


Grep tool was sometimes failing for me to find matches.
Instead of understanding and fixing, this just switches to using rg --json, similar to the Ripgrep.search code.
I briefly tried reusing the latter, but it expects a dir and grep tool works fine with a file path, so I chose not to reuse.

There are further improvements to be had here with reusing Ripgrep, or at least the schema. But not this PR.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2218 **State:** closed **Merged:** No --- Grep tool was _sometimes_ failing for me to find matches. Instead of understanding and fixing, this just switches to using `rg --json`, similar to the `Ripgrep.search` code. I briefly tried reusing the latter, but it expects a dir and grep tool works fine with a file path, so I chose not to reuse. There are further improvements to be had here with reusing `Ripgrep`, or at least the schema. But not this PR.
yindo added the pull-request label 2026-02-16 18:14:51 -05:00
yindo closed this issue 2026-02-16 18:14:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10243