1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +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 Robert Helgesson
parent 77c698fa4b
commit df7f29a231
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

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