Skip to content

feat(rg): accept preprocessor controls - #1677

Merged
chaliy merged 1 commit into
mainfrom
2026-05-22-rg-batch-3
May 22, 2026
Merged

chaliy merged 1 commit into
mainfrom
2026-05-22-rg-batch-3

Conversation

@chaliy

@chaliy chaliy commented May 22, 2026

Copy link
Copy Markdown
Contributor

What

Add rg parser/help support for --pre, --pre-glob, and --no-pre, with no-op parity for cat/empty preprocessors and explicit rejection for unsupported transforming preprocessors.

Why

These are real ripgrep flags and common enough that scripts should not fail just because the flags are present when preprocessing is effectively disabled/no-op.

How

Track the selected preprocessor during rg option parsing, consume and validate --pre-glob syntax, clear preprocessing with --no-pre, update help output, and add real-rg differential cases for cat, empty preprocessor, pre-glob, and --no-pre override behavior.

Risk

  • Low
  • Arbitrary transforming preprocessors remain unsupported and return an explicit error instead of silently searching untransformed content.

Checklist

  • Tests added or updated
  • Backward compatibility considered

@chaliy
chaliy marked this pull request as ready for review May 22, 2026 13:44
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 5970cf6 Commit Preview URL May 22 2026, 01:45 PM

@chaliy
chaliy merged commit 07a0b06 into main May 22, 2026
38 of 40 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-batch-3 branch May 22, 2026 14:13
chaliy added a commit that referenced this pull request May 30, 2026
## What
Add rg parser/help support for --pre, --pre-glob, and --no-pre, with
no-op parity for cat/empty preprocessors and explicit rejection for
unsupported transforming preprocessors.

## Why
These are real ripgrep flags and common enough that scripts should not
fail just because the flags are present when preprocessing is
effectively disabled/no-op.

## How
Track the selected preprocessor during rg option parsing, consume and
validate --pre-glob syntax, clear preprocessing with --no-pre, update
help output, and add real-rg differential cases for cat, empty
preprocessor, pre-glob, and --no-pre override behavior.

## Risk
- Low
- Arbitrary transforming preprocessors remain unsupported and return an
explicit error instead of silently searching untransformed content.

## Checklist
- [x] Tests added or updated
- [x] Backward compatibility considered
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.

1 participant