Skip to content

A line by line find-and-replace CLI tool driven by ripgrep and sed

Notifications You must be signed in to change notification settings

kashifismael/find-and-replace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

find-and-replace

A line by line find-and-replace CLI tool driven by ripgrep and sed

Prerequisites

This tools uses ripgrep to find strings to replace, so it needs to be installed https://github.com/BurntSushi/ripgrep

Caveats

Currently implemented against GNU sed as this tool was written on Mac

Inspiration

IDEs like Intellij and VS Code have good line-by-line find and replace capabilities. But I couldn't find such a tool for the terminal, so i made one :)

Inspiration from the interface comes Git's add/restore -p functionality, where you can add/restore a chunk, one at a time.

Usage

go build .

./findandreplace [string-to-remove] [string-to-replace] [file]

k + Enter to keep r + Enter to replace

About

A line by line find-and-replace CLI tool driven by ripgrep and sed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages