From 7ae248300c2892082d5c2977d435d638f7914b38 Mon Sep 17 00:00:00 2001 From: marcelarie Date: Tue, 8 Oct 2024 19:49:30 +0200 Subject: [PATCH] feat: only cd to the path if it is not empty --- templates/nushell.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/nushell.txt b/templates/nushell.txt index 5619a14..2fa3f34 100644 --- a/templates/nushell.txt +++ b/templates/nushell.txt @@ -51,7 +51,10 @@ def --env --wrapped __zoxide_z [...rest:string] { "" }) } - cd $path + + if $path != "" { + cd $path + } {%- if echo %} echo $env.PWD {%- endif %}