feat[work]: add git-replace

This commit is contained in:
Leon Schwarzäugl 2025-10-21 13:10:54 +02:00
parent 95fa226b9e
commit 9da6bd15ab
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
3 changed files with 30 additions and 0 deletions

View file

@ -11328,6 +11328,7 @@ This is just a separate container for derivations defined in [[#h:64a5cc16-6b16-
swarselzellij
sshrm
endme
git-replace
rustdesk-vbc
];
@ -18047,6 +18048,25 @@ Sometimes my DE crashes after putting it to suspend - to be precise, it happens
#+end_src
*** git-replace
This script allows for quick git replace of a string.
#+begin_src nix-ts :tangle pkgs/git-replace/default.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"
'';
}
#+end_src
** Profiles
:PROPERTIES:
:CUSTOM_ID: h:f0f1c961-3e7a-47b8-99ab-1654bb45dffc