mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
feat[work]: add git-replace
This commit is contained in:
parent
95fa226b9e
commit
9da6bd15ab
3 changed files with 30 additions and 0 deletions
9
pkgs/git-replace/default.nix
Normal file
9
pkgs/git-replace/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ name, writeShellApplication, git, gnugrep, findutils, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ git gnugrep findutils ];
|
||||
text = ''
|
||||
git grep -l "$1" | xargs sed -i "s/$1/$2/g"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue