fix: use `str length` for str instead of `length`
This commit is contained in:
parent
42e1d5dd3b
commit
6a2a727f05
|
|
@ -41,7 +41,7 @@ if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
|
||||||
# Jump to a directory using only keywords.
|
# Jump to a directory using only keywords.
|
||||||
def-env __zoxide_z [...rest:string] {
|
def-env __zoxide_z [...rest:string] {
|
||||||
let arg0 = ($rest | append '~').0
|
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
|
$arg0
|
||||||
} else {
|
} else {
|
||||||
(zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n")
|
(zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue