diff --git a/templates/nushell.txt b/templates/nushell.txt index 1ee3206..4153b39 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -26,7 +26,7 @@ export-env { if not $__zoxide_hooked { $env.config.hooks.pre_prompt = ($env.config.hooks.pre_prompt | append { __zoxide_hook: true, - code: {|| zoxide add '--' $env.PWD} + code: {|| ^zoxide add -- $env.PWD} }) } {%- else if hook == InitHook::Pwd %} @@ -43,7 +43,7 @@ export-env { if not $__zoxide_hooked { $env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append { __zoxide_hook: true, - code: {|_, dir| zoxide add '--' $dir} + code: {|_, dir| ^zoxide add -- $dir} }) } {%- endif %} @@ -62,7 +62,7 @@ def --env --wrapped __zoxide_z [...rest: string] { [ '-' ] => {'-'}, [ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg} _ => { - zoxide query --exclude $env.PWD '--' ...$rest | str trim -r -c "\n" + ^zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n" } } cd $path @@ -73,7 +73,7 @@ def --env --wrapped __zoxide_z [...rest: string] { # Jump to a directory using interactive search. def --env --wrapped __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 %}