feat(nix): add scripts for zk, edit, commit and rebuild
This commit is contained in:
parent
782bbcbaa3
commit
08090fa25c
5 changed files with 244 additions and 9 deletions
12
nix/homes/rafiq/_scripts/edit.nix
Normal file
12
nix/homes/rafiq/_scripts/edit.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
finder = "${pkgs.fzf}/bin/fzf --preview 'cat {}'";
|
||||
in
|
||||
pkgs.writeShellScriptBin "edit" # sh
|
||||
''
|
||||
if [ $# -gt 0 ]; then
|
||||
$EDITOR $(${finder} -q $*)
|
||||
else
|
||||
$EDITOR $(${finder})
|
||||
fi
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue