You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtk rg --files <path> treats the path as a pattern when stdin is a pipe #4237
When stdin is a pipe, routing (stdin_is_readable()) takes the positional src/cmds/system to be the pattern and streams the output verbatim, tracked 0/0. When stdin is closed, the same command goes through the file-list path and gets compressed. The output is correct both times, but the saving depends on stdin instead of on the command.
Expected: --files takes paths, never a pattern, so it should route the same way whatever stdin is.
Seen on #4170's head, which adds the file-list fold shown above. The routing decision itself predates that PR.
rtk rg --files <path> routes based on stdin readability instead of the command itself, so the fold/compression in #4170 only applies when stdin is closed.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
📁 Relevant files
src/cmds/rg.rs
Suggested Actions
Route --files by presence of the flag/positional path, not stdin_is_readable()
Activity
rtk-wshm-sync-bot commentedon Sep 25, 2026
🔍 Automated Triage
bugmediumSummary
rtk rg --files <path>routes based on stdin readability instead of the command itself, so the fold/compression in #4170 only applies when stdin is closed.📁 Relevant files
src/cmds/rg.rsSuggested Actions
--filesby presence of the flag/positional path, notstdin_is_readable()rtk rg --files <path>with stdin both open (piped) and closedTriaged automatically by wshm · This is an automated analysis, not a human review.