From 28a1edc101248aa1067ee01906720dd12cabddd0 Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Wed, 23 Sep 2026 15:45:24 +0200 Subject: [PATCH] nu: Add `shadir` helper --- tree/.config/nushell/config.nu.tpl | 1 + tree/.local/nu/shadir.nu | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 tree/.local/nu/shadir.nu diff --git a/tree/.config/nushell/config.nu.tpl b/tree/.config/nushell/config.nu.tpl index 8891257..7b49ff7 100644 --- a/tree/.config/nushell/config.nu.tpl +++ b/tree/.config/nushell/config.nu.tpl @@ -58,6 +58,7 @@ source ~/.local/nu/readelf.nu source ~/.local/nu/mullvad.nu source ~/.local/nu/git.nu source ~/.local/nu/tailscale.nu +source ~/.local/nu/shadir.nu {% if os == "darwin" %} source ~/.local/nu/macos.nu {% end %} diff --git a/tree/.local/nu/shadir.nu b/tree/.local/nu/shadir.nu new file mode 100644 index 0000000..7029573 --- /dev/null +++ b/tree/.local/nu/shadir.nu @@ -0,0 +1,5 @@ +def shadir [ + p: path, # Path to the directory to be sha256summed +]: nothing -> string { + (^find $p -type f -print0 | xargs -0 sha256sum | ^sort | sha256sum) +}