Grep fails when pattern starts with a dash #2324

Closed
opened 2026-02-16 17:35:07 -05:00 by yindo · 1 comment
Owner

Originally created by @SleepyLeslie on GitHub (Oct 29, 2025).

Description

The grep tool does not consider the situation when the pattern starts with a dash, making ripgrep think it is a flag.

OpenCode version

0.15.23

Steps to reproduce

Ask the agent to grep for such a pattern.

Screenshot and/or share link

Image

Operating System

Arch Linux

Terminal

kitty

Originally created by @SleepyLeslie on GitHub (Oct 29, 2025). ### Description The grep tool does not consider the situation when the pattern starts with a dash, making ripgrep think it is a flag. ### OpenCode version 0.15.23 ### Steps to reproduce Ask the agent to grep for such a pattern. ### Screenshot and/or share link <img width="1812" height="353" alt="Image" src="https://github.com/user-attachments/assets/4f8e93d8-163b-4922-a7a9-e091ddc9a794" /> ### Operating System Arch Linux ### Terminal kitty
yindo added the bug label 2026-02-16 17:35:07 -05:00
yindo closed this issue 2026-02-16 17:35:07 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 29, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #797: Both issues involve command line argument parsing failures with special characters, including dashes that get interpreted as flags before reaching the tool

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 29, 2025): This issue might be a duplicate of existing issues. Please check: - #797: Both issues involve command line argument parsing failures with special characters, including dashes that get interpreted as flags before reaching the tool Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2324