From c7ab4277dfdae7d3a45a8e8ded0490e359959301 Mon Sep 17 00:00:00 2001 From: Jason Shirk Date: Tue, 5 May 2020 20:54:43 -0700 Subject: [PATCH] Correctly handle -h from z function --- src/subcommand/init/shell/powershell.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/subcommand/init/shell/powershell.rs b/src/subcommand/init/shell/powershell.rs index e1988fb..ae5b5f6 100644 --- a/src/subcommand/init/shell/powershell.rs +++ b/src/subcommand/init/shell/powershell.rs @@ -35,8 +35,10 @@ function {} {{ }} else {{ $result = zoxide query @args - if ($LASTEXITCODE -eq 0) {{ + if ($LASTEXITCODE -eq 0 -and ((Test-Path $result) -eq $true)) {{ z_cd $result + }} else {{ + $result }} }} }}