1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-25 19:29:47 +01:00

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
This commit is contained in:
x10an14 2023-12-28 16:47:07 +01:00 committed by Mikilio
parent b1ed121009
commit 18960fb8af
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -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