Handle both literal and non-literal paths
This commit is contained in:
parent
8d9317ce3d
commit
99c56ba781
|
|
@ -106,8 +106,11 @@ 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)) {
|
||||
__zoxide_cd $args[0] $(Test-Path -LiteralPath $args[0])
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue