From 6a2a727f050e465f8dd9d3b19cc5c55b1d6c1b3d Mon Sep 17 00:00:00 2001 From: Maxim Onciul Date: Wed, 26 Jul 2023 09:41:47 +0200 Subject: [PATCH] fix: use `str length` for str instead of `length` --- templates/nushell.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/nushell.txt b/templates/nushell.txt index c4894da..6527c95 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -41,7 +41,7 @@ if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) { # Jump to a directory using only keywords. def-env __zoxide_z [...rest:string] { let arg0 = ($rest | append '~').0 - let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) { + let path = if (($rest | str length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) { $arg0 } else { (zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n")