Skip to content

feat(rg): support highlight colors - #1699

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

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

Conversation

@chaliy

@chaliy chaliy commented May 23, 2026

Copy link
Copy Markdown
Contributor

What

Add support for real rg's highlight color type in --colors.

Why

Real rg accepts --colors highlight:... and uses it to wrap matching lines. Bashkit rejected the color type.

How

  • Add highlight to RgColorScheme with a disabled default.
  • Apply highlight styling around matched output lines and restore it after nested match coloring.
  • Add a data-driven real-rg differential case for --colors highlight:fg:blue.

Risk

  • Low
  • Affects ANSI color output only when highlight is explicitly configured.

Checklist

  • Tests added or updated
  • Backward compatibility considered

@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 4664754 Commit Preview URL May 23 2026, 01:36 AM

@chaliy
chaliy merged commit 557c56d into main May 23, 2026
34 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-batch-20 branch May 23, 2026 01:48
chaliy added a commit that referenced this pull request May 30, 2026
## What
Add support for real rg's `highlight` color type in `--colors`.

## Why
Real rg accepts `--colors highlight:...` and uses it to wrap matching
lines. Bashkit rejected the color type.

## How
- Add `highlight` to `RgColorScheme` with a disabled default.
- Apply highlight styling around matched output lines and restore it
after nested match coloring.
- Add a data-driven real-rg differential case for `--colors
highlight:fg:blue`.

## Risk
- Low
- Affects ANSI color output only when `highlight` is explicitly
configured.

## 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