Skip to content

feat(rg): support hex ansi color numbers - #1701

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

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

Conversation

@chaliy

@chaliy chaliy commented May 23, 2026

Copy link
Copy Markdown
Contributor

What

Support ripgrep-style hex ANSI-256 color numbers in rg --colors specs.

Why

Real rg accepts color specs like match:fg:0xff and match:bg:0x05. Bashkit only handled decimal ANSI color indexes.

How

  • Extend rg color-number parsing to accept 0x/0X hex u8 values.
  • Add real-rg differential coverage for foreground and background hex ANSI colors.

Risk

  • Low
  • Limited to rg --colors parsing and ANSI rendering.

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 d217007 Commit Preview URL May 23 2026, 02:14 AM

@chaliy
chaliy merged commit bd8cc2b into main May 23, 2026
34 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-batch-22 branch May 23, 2026 02:26
chaliy added a commit that referenced this pull request May 30, 2026
## What
Support ripgrep-style hex ANSI-256 color numbers in rg --colors specs.

## Why
Real rg accepts color specs like match:fg:0xff and match:bg:0x05.
Bashkit only handled decimal ANSI color indexes.

## How
- Extend rg color-number parsing to accept 0x/0X hex u8 values.
- Add real-rg differential coverage for foreground and background hex
ANSI colors.

## Risk
- Low
- Limited to rg --colors parsing and ANSI rendering.

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