diff options
| author | Aiden Cline <[email protected]> | 2025-10-06 23:24:00 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-06 23:24:00 -0500 |
| commit | 06c42093c84798f7740745ead50beb0d63d6e731 (patch) | |
| tree | 4752a6b218d7f5afd29961d21dffe2ad94956f47 | |
| parent | 0534bc0c0920dd1cb2503caeb9de6c4bbd5dce05 (diff) | |
| download | opencode-06c42093c84798f7740745ead50beb0d63d6e731.tar.gz opencode-06c42093c84798f7740745ead50beb0d63d6e731.zip | |
tweak: grep tool to handle single file better (#3004)
| -rw-r--r-- | packages/opencode/src/tool/grep.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/opencode/src/tool/grep.ts b/packages/opencode/src/tool/grep.ts index 3faeb6fb4..cc654e339 100644 --- a/packages/opencode/src/tool/grep.ts +++ b/packages/opencode/src/tool/grep.ts @@ -20,12 +20,11 @@ export const GrepTool = Tool.define("grep", { const searchPath = params.path || Instance.directory const rgPath = await Ripgrep.filepath() - const args = ["-n", params.pattern] + const args = ["-nH", "--field-match-separator=|", params.pattern] if (params.include) { args.push("--glob", params.include) } args.push(searchPath) - args.push("--field-match-separator=|") const proc = Bun.spawn([rgPath, ...args], { stdout: "pipe", |
