Correctly handle -h from z function

This commit is contained in:
Jason Shirk 2020-05-05 20:54:43 -07:00
parent be1aeed756
commit c7ab4277df
1 changed files with 3 additions and 1 deletions

View File

@ -35,8 +35,10 @@ function {} {{
}} }}
else {{ else {{
$result = zoxide query @args $result = zoxide query @args
if ($LASTEXITCODE -eq 0) {{ if ($LASTEXITCODE -eq 0 -and ((Test-Path $result) -eq $true)) {{
z_cd $result z_cd $result
}} else {{
$result
}} }}
}} }}
}} }}