Environment
- rtk 0.42.0 (Homebrew, macOS arm64)
- ripgrep 14.x installed at ~/homebrew/bin/rg
Reproduction
rtk grep -i "compact" ~/.pi/agent/ -g "*.md" -l
Expected: filters files by glob using ripgrep internally
Actual: calls /usr/bin/grep which does not support -g or --glob
grep: invalid option -- g
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] ...
Also fails with --glob:
rtk grep -i "compact" ~/.pi/agent/ --glob "*.md"
# grep: unrecognized option `--glob`
Context
rtk rewrite correctly rewrites rg → rtk grep, but rtk grep delegates to system grep instead of ripgrep. Since the rewrite assumes ripgrep semantics, any rg-specific flags break.
Expected behavior
rtk grep should either:
- Use ripgrep internally (since it rewrites
rg commands to itself), or
- Not rewrite
rg commands that use flags incompatible with its own interface
Workaround
RTK_DISABLED=1 rg ... bypasses the rewrite.
Environment
Reproduction
Expected: filters files by glob using ripgrep internally
Actual: calls
/usr/bin/grepwhich does not support-gor--globAlso fails with
--glob:Context
rtk rewritecorrectly rewritesrg→rtk grep, butrtk grepdelegates to systemgrepinstead of ripgrep. Since the rewrite assumes ripgrep semantics, any rg-specific flags break.Expected behavior
rtk grepshould either:rgcommands to itself), orrgcommands that use flags incompatible with its own interfaceWorkaround
RTK_DISABLED=1 rg ...bypasses the rewrite.