This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install ripgrep & moreutils (for the sponge tool) See https://www.putorius.net/moreutils.html | |
# On mac: brew install moreutils ripgrep | |
# Source this file in your zsh config by adding `source .rgr.zsh` to your .zshrc | |
function rgr() { | |
local context_lines=2 | |
local search="$1" | |
local replace="$2" | |
shift 2 |