Skip to content

feat(rg): honor custom color styles - #1692

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

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

Conversation

@chaliy

@chaliy chaliy commented May 22, 2026

Copy link
Copy Markdown
Contributor

What

Adds real-rg-style parsing and output support for common --colors specs.

Why

Bashkit now supports forced color output, but --colors was still effectively ignored. Real rg lets callers customize path, line, column, and match highlighting.

How

  • Adds a color scheme for path, line, column, and match output.
  • Supports fg, bg, style:bold, style:nobold, and none for common ANSI colors.
  • Applies custom styles to normal output, only-matching output, count/list paths, and --files path listings.
  • Adds byte-exact real-rg differential cases for custom match, prefix, and disabled match colors.

Risk

  • Low / Medium
  • Only affects explicitly forced color output or invalid --colors specs.

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 cb7ce26 Commit Preview URL May 22 2026, 11:04 PM

@chaliy
chaliy merged commit 0f96f2c into main May 22, 2026
34 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-batch-13 branch May 22, 2026 23:16
chaliy added a commit that referenced this pull request May 30, 2026
## What
Adds real-rg-style parsing and output support for common `--colors`
specs.

## Why
Bashkit now supports forced color output, but `--colors` was still
effectively ignored. Real rg lets callers customize path, line, column,
and match highlighting.

## How
- Adds a color scheme for path, line, column, and match output.
- Supports `fg`, `bg`, `style:bold`, `style:nobold`, and `none` for
common ANSI colors.
- Applies custom styles to normal output, only-matching output,
count/list paths, and `--files` path listings.
- Adds byte-exact real-rg differential cases for custom match, prefix,
and disabled match colors.

## Risk
- Low / Medium
- Only affects explicitly forced color output or invalid `--colors`
specs.

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