repgrep icon indicating copy to clipboard operation
repgrep copied to clipboard

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

Open willhansen opened this issue 1 year ago • 1 comments

Would provide the workflow desired by this ripgrep discussion

willhansen avatar Dec 08 '24 20:12 willhansen

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>

acheronfail avatar Feb 13 '25 04:02 acheronfail