Crates.io | repgrep |
lib.rs | repgrep |
version | 0.15.0 |
source | src |
created_at | 2020-06-22 06:40:28.222379 |
updated_at | 2023-12-18 00:27:12.007332 |
description | An interactive command line replacer for `ripgrep`. |
homepage | https://github.com/acheronfail/repgrep |
repository | https://github.com/acheronfail/repgrep |
max_upload_size | |
id | 256565 |
size | 1,945,693 |
An interactive replacer for ripgrep
.
This is an interactive command line tool to make find and replacement easy.
It uses ripgrep
to find, and then provides you with a simple interface to see
the replacements in real-time and conditionally replace matches.
Some features:
/foo (\w+)/
replace with bar $1
)Supported file encodings:
Other encodings are possibly supported but untested at the moment. See this issue for more information.
After installing, just use rgr
(think: rg
+ replace
).
The arguments are:
rgr <rg arguments> # See `rgr --help` for more details
Here's an example where we ran the command:
rgr -C5 dreamcast
And have entered the replacement flycast
:
First and foremost, make sure you've installed ripgrep
(AKA: rg
).
To do so see the ripgrep
installation instructions.
See the releases page for pre-compiled binaries.
NOTE: The minimum Rust version required is 1.72.0
.
cargo install repgrep
repgrep
can be installed
from the official repositories using Pacman.
pacman -S repgrep
repgrep
can also be installed on macOS using MacPorts:
sudo port install repgrep
More info here.
NOTE: The minimum Rust version required is 1.72.0
.
git clone https://github.com/acheronfail/repgrep/
cd repgrep
cargo install --path .
License: Unlicense OR MIT OR Apache-2.0