.dotfiles/pkgs/git-replace/default.nix
2025-10-21 13:19:48 +02:00

9 lines
217 B
Nix

{ name, writeShellApplication, git, gnugrep, findutils, ... }:
writeShellApplication {
inherit name;
runtimeInputs = [ git gnugrep findutils ];
text = ''
git grep -l "$1" | xargs sed -i "s/$1/$2/g"
'';
}