From 1809333be652be474d132da235cf9aad9a998b3d Mon Sep 17 00:00:00 2001 From: Zuruuh Date: Wed, 10 Jan 2024 09:08:45 +0100 Subject: [PATCH] Update nushell template to use rest operator where needed --- templates/nushell.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/nushell.txt b/templates/nushell.txt index 2cfdb00..887fe36 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -44,7 +44,7 @@ def --env __zoxide_z [...rest:string] { let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) { $arg0 } else { - (zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n") + (zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n") } cd $path {%- if echo %} @@ -54,7 +54,7 @@ def --env __zoxide_z [...rest:string] { # Jump to a directory using interactive search. def --env __zoxide_zi [...rest:string] { - cd $'(zoxide query --interactive -- $rest | str trim -r -c "\n")' + cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")' {%- if echo %} echo $env.PWD {%- endif %}