From 5450f73b5a72d84f8027fec5f2459fdc574429c0 Mon Sep 17 00:00:00 2001 From: Antoine Vaure Date: Mon, 12 Aug 2024 16:58:09 +0200 Subject: [PATCH] Add function in fish to quickly make a nix .envrc --- fish.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fish.nix b/fish.nix index 6967450..4948bfa 100644 --- a/fish.nix +++ b/fish.nix @@ -79,6 +79,10 @@ echo -n -s (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) \ (set_color -i yellow) $direnv_status $normal " "$prompt_status " "$suffix " " ''; + # run $argv when a file tracked by git is updated. + gitentr.body = '' + ${pkgs.git}/bin/git ls-tree -r HEAD --name-only | ${pkgs.entr}/bin/entr $argv + ''; }; shellAliases = {