From 628f8542a01813e36edde2fba42bf0eafb9dfb05 Mon Sep 17 00:00:00 2001 From: benz Date: Tue, 13 May 2025 13:18:55 +0100 Subject: [PATCH] Fixes #995: Wildcard expansion for PowerShell (#1001) Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com> --- templates/powershell.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/powershell.txt b/templates/powershell.txt index 7744338..e134ab1 100644 --- a/templates/powershell.txt +++ b/templates/powershell.txt @@ -106,9 +106,12 @@ function global:__zoxide_z { elseif ($args.Length -eq 1 -and ($args[0] -eq '-' -or $args[0] -eq '+')) { __zoxide_cd $args[0] $false } - elseif ($args.Length -eq 1 -and (Test-Path $args[0] -PathType Container)) { + elseif ($args.Length -eq 1 -and (Test-Path $args[0] -PathType Container -LiteralPath)) { __zoxide_cd $args[0] $true } + elseif ($args.Length -eq 1 -and (Test-Path $args[0] -PathType Container -Path)) { + __zoxide_cd $args[0] $false + } else { $result = __zoxide_pwd if ($null -ne $result) {