Literal cd for paths

This commit is contained in:
Ajeet D'Souza 2023-05-06 18:32:20 +05:30
parent 0ecfbf7e68
commit 3904026d74
1 changed files with 4 additions and 4 deletions

View File

@ -89,12 +89,12 @@ function __zoxide_z {
if ($args.Length -eq 0) {
__zoxide_cd ~ $true
}
elseif (
$args.Length -eq 1 -and
(($args[0] -eq '-' -or $args[0] -eq '+') -or (Test-Path $args[0] -PathType Container))
) {
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] $true
}
else {
$result = __zoxide_pwd
if ($null -ne $result) {