Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ripgrep has the -r flag to replace in results. This could auto-populate the replacement text with repgrep. #104

Open
willhansen opened this issue Dec 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@willhansen
Copy link

willhansen commented Dec 8, 2024

Would provide the workflow desired by this ripgrep discussion

@acheronfail acheronfail added the enhancement New feature or request label Feb 12, 2025
@acheronfail
Copy link
Owner

acheronfail commented Feb 13, 2025

Good suggestion, I have roughly implemented this in the rg-replace-flag branch. One question for you: if -r/--replace is passed, should rgr start in the "select matches" mode, or the "input replacement" mode?

Basically these scenarios:

  1. -r bar passed: rgr opens in "input replacement" mode with bar prefilled (if you want to select/deselect items, you'd have to press esc to go back to the previous mode)
  2. -r bar passed: rgr opens as per usual in select mode, but when enter is pressed to input a replacement bar is pre-filled
  3. <your suggestion here>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants