From df7f29a231a483c88cbd00608db99634f854a8e1 Mon Sep 17 00:00:00 2001 From: x10an14 Date: Thu, 28 Dec 2023 16:47:07 +0100 Subject: [PATCH] zoxide: fix use with recent Nushell 1. Zoxide (v0.9.2) leverages `def-env` in their `zoxide init nushell` output. 2. Since Nushell v0.88, they have removed (previously deprecated) `def-env`: https://www.nushell.sh/blog/2023-12-12-nushell_0_88_0.html#breaking-changes-toc --- modules/programs/zoxide.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/programs/zoxide.nix b/modules/programs/zoxide.nix index 04cb29fdb..fe82ffc25 100644 --- a/modules/programs/zoxide.nix +++ b/modules/programs/zoxide.nix @@ -86,7 +86,9 @@ in { if not ($zoxide_cache | path exists) { mkdir $zoxide_cache } - ${cfg.package}/bin/zoxide init nushell ${cfgOptions} | save --force ${config.xdg.cacheHome}/zoxide/init.nu + ${cfg.package}/bin/zoxide init nushell ${cfgOptions} | + str replace "def-env" "def --env" --all | # https://github.com/ajeetdsouza/zoxide/pull/632 + save --force ${config.xdg.cacheHome}/zoxide/init.nu ''; extraConfig = '' source ${config.xdg.cacheHome}/zoxide/init.nu