mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +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
|
|
@ -11328,6 +11328,7 @@ This is just a separate container for derivations defined in [[#h:64a5cc16-6b16-
|
||||||
swarselzellij
|
swarselzellij
|
||||||
sshrm
|
sshrm
|
||||||
endme
|
endme
|
||||||
|
git-replace
|
||||||
|
|
||||||
rustdesk-vbc
|
rustdesk-vbc
|
||||||
];
|
];
|
||||||
|
|
@ -18047,6 +18048,25 @@ Sometimes my DE crashes after putting it to suspend - to be precise, it happens
|
||||||
|
|
||||||
#+end_src
|
#+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
|
** Profiles
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h:f0f1c961-3e7a-47b8-99ab-1654bb45dffc
|
:CUSTOM_ID: h:f0f1c961-3e7a-47b8-99ab-1654bb45dffc
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
swarselzellij
|
swarselzellij
|
||||||
sshrm
|
sshrm
|
||||||
endme
|
endme
|
||||||
|
git-replace
|
||||||
|
|
||||||
rustdesk-vbc
|
rustdesk-vbc
|
||||||
];
|
];
|
||||||
|
|
|
||||||
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