Skip to content

feat(rg): add generate output mode - #1680

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

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

Conversation

@chaliy

@chaliy chaliy commented May 22, 2026

Copy link
Copy Markdown
Contributor

What

Add rg --generate support for man and shell completion output modes.

Why

--generate is the remaining completion-exposed rg behavior flag. Scripts and packaging flows use it to produce completion/man artifacts, so bashkit should not treat it as an unknown option.

How

Handle --generate as an early-exit mode, emit lightweight bash/zsh/fish/PowerShell completion scripts and a roff man page, update help text, and add data-driven real-rg differential cases that verify exit status plus key output markers.

Risk

  • Low
  • Generated artifacts are intentionally lightweight and not byte-for-byte copies of upstream ripgrep output.

Checklist

  • Tests added or updated
  • Backward compatibility considered

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

cloudflare-workers-and-pages Bot commented May 22, 2026 •

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

@chaliy
chaliy force-pushed the 2026-05-22-rg-batch-6 branch from 2f972ff to d9b052c Compare May 22, 2026 16:25
@chaliy
chaliy merged commit 6719561 into main May 22, 2026
34 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-batch-6 branch May 22, 2026 16:38
chaliy added a commit that referenced this pull request May 30, 2026
## What
Add rg --generate support for man and shell completion output modes.

## Why
--generate is the remaining completion-exposed rg behavior flag. Scripts
and packaging flows use it to produce completion/man artifacts, so
bashkit should not treat it as an unknown option.

## How
Handle --generate as an early-exit mode, emit lightweight
bash/zsh/fish/PowerShell completion scripts and a roff man page, update
help text, and add data-driven real-rg differential cases that verify
exit status plus key output markers.

## Risk
- Low
- Generated artifacts are intentionally lightweight and not
byte-for-byte copies of upstream ripgrep output.

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