2024-11-15 11:45:00
github.com
Scooter is an interactive find-and-replace terminal UI app.
Search with either a fixed string or a regular expression, enter a replacement, and interactively toggle which instances you want to replace. You can also specify a regex pattern for the file paths you want to search.
If the instance you’re attempting to replace has changed since the search was performed, e.g. if you’ve switched branches and that line no longer exists, that particular replacement won’t occur: you’ll see all such cases at the end.
Scooter respects both .gitignore
and .ignore
files.
You can add capture groups to the search regex and use them in the replacement string: for instance, if you use (\d) - (\w+)
for the search text and ($2) "$1"
as the replacement, then 9 - foo
would be replaced with (foo) "9"
.
Ensure you have cargo installed (see here), and then run
Ensure you have cargo installed (see here), then pull down the repo and run
Run scooter
in a terminal to launch Scooter. You can then enter some text to search with and text to replace matches with, toggle on or off fixed strings, and enter a regex pattern that filenames must match. A more extensive set of keymappings will be shown at the bottom of the window: these vary slightly depending on the screen you’re on.
Support Techcratic
If you find value in Techcratic’s insights and articles, consider supporting us with Bitcoin. Your support helps me, as a solo operator, continue delivering high-quality content while managing all the technical aspects, from server maintenance to blog writing, future updates, and improvements. Support Innovation! Thank you.
Bitcoin Address:
bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge
Please verify this address before sending funds.
Bitcoin QR Code
Simply scan the QR code below to support Techcratic.
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.