Fixes #995: Wildcard expansion for PowerShell (#1001)

Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
This commit is contained in:
benz 2025-05-13 13:18:55 +01:00 committed by GitHub
parent 3d9f928e01
commit 628f8542a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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) {