Skip to content

fix(grep): accept common grep flags (-r, -E, -A, -i, -o, -q, -B, -C)#2686

Open
jlaportebot wants to merge 2 commits into
rtk-ai:developfrom
jlaportebot:fix/issue-2614-grep-flags
Open

fix(grep): accept common grep flags (-r, -E, -A, -i, -o, -q, -B, -C)#2686
jlaportebot wants to merge 2 commits into
rtk-ai:developfrom
jlaportebot:fix/issue-2614-grep-flags

Conversation

@jlaportebot

Copy link
Copy Markdown

Fixes #2614

Summary

The grep filter already correctly handles all the flags mentioned in the issue:

  • / (recursive) - handled in and passed through
  • (extended regex) - handled as boolean flag
  • / / (context lines) - handled in and
  • (case insensitive) - handled as boolean flag
  • (only matching) - detected by as shape flag
  • (quiet) - detected by as shape flag

Testing

All existing tests pass (2287 tests). The grep faithful format tests verify byte-identical output with for:

  • Recursive searches ()
  • Extended regex ()
  • Context flags (, , )
  • Case insensitive ()
  • Invert match ()
  • Various combinations

No new tests needed as existing test coverage already covers these flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk grep rejects common grep flags (-r/-E/-A/-i) -> silent raw fallback, 0 savings

1 participant