From 0212406e4d539a336eba1d2dcfcf425f1505e6ad Mon Sep 17 00:00:00 2001 From: Juhan280 Date: Tue, 14 Jul 2026 15:10:41 +0600 Subject: [PATCH] address review comments bump minimum supported nushell version to 0.110 --- README.md | 3 +-- man/man1/zoxide-init.1 | 3 +-- templates/nushell.txt | 17 +++++++---------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c572e7a..8b169ab 100644 --- a/README.md +++ b/README.md @@ -268,8 +268,7 @@ zoxide can be installed in 4 easy steps: > ``` > > **Note:** - > zoxide requires Nushell v0.106.0+. A newer version is recommended for - > completions to work properly. + > zoxide only supports Nushell v0.110.0+. diff --git a/man/man1/zoxide-init.1 b/man/man1/zoxide-init.1 index b130347..26b7b0c 100644 --- a/man/man1/zoxide-init.1 +++ b/man/man1/zoxide-init.1 @@ -45,8 +45,7 @@ Now, add this to the \fBend\fR of your config file (find it by running \fBsource ~/.zoxide.nu\fR .fi .sp -Note: zoxide requires Nushell v0.106.0 or later. A more recent version is -recommended for completions to function correctly. +Note: zoxide only supports Nushell v0.110.0+. .TP .B powershell Add this to the \fBend\fR of your config file (find it by running \fBecho diff --git a/templates/nushell.txt b/templates/nushell.txt index f4d3d30..cfeafb4 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -4,9 +4,6 @@ # Code generated by zoxide. DO NOT EDIT. module zoxide_integration { - # From version 0.110.0, $nu.home-path has been renamed to $nu.home-dir - const homedir = if $nu.home-dir? != null { $nu.home-dir } else { $nu.home-path } - {{ section }} # # Hook configuration for zoxide. @@ -59,12 +56,12 @@ module zoxide_integration { if $ast.0.span.end >= ($context | str length) { return null } ^zoxide query --exclude $env.PWD --interactive -- ...$ast.content - | str trim --right --char "\n" - | if $in starts-with $"($homedir)(char psep)" { str replace $homedir "~" } else {} - | wrap display_override - | insert value { get display_override | debug --raw-value } - | insert span { start: ($ast | first).span.start, end: ($ast | last).span.end } - | [$in] + | if $in starts-with $"($nu.home-dir)(char psep)" { str replace $nu.home-dir "~" } else {} + | [{ + display_override: $in, + value: ($in | debug --raw-value), + span: { start: ($ast | first).span.start, end: ($ast | last).span.end } + }] } {{ section }} @@ -127,4 +124,4 @@ export use zoxide_integration * # # source ~/.zoxide.nu # -# Note: zoxide only supports Nushell v0.106.0+. +# Note: zoxide only supports Nushell v0.110.0+.