fix(pwsh, z): Fix zoxide work with pwsh

This commit is contained in:
js0ny 2025-02-14 21:19:19 +00:00
parent 0803e9d8b2
commit d9aa8fafdb
2 changed files with 19 additions and 17 deletions

View file

@ -9,20 +9,3 @@ ${function:docs} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Docum
${function:down} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Downloads") }
${function:dt} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Desktop") }
${function:one} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "OneDrive") }
if (Get-Command zoxide -ErrorAction SilentlyContinue) {
Invoke-Expression (& { (zoxide init powershell | Out-String) })
${function:...} = { z -Path (Join-Path -Path .. -ChildPath ..) }
${function:....} = { z -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) }
${function:.....} = { z -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) }
${function:......} = { z -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) }
${function:z-} = { z - }
}
else {
${function:...} = { Set-Location -Path (Join-Path -Path .. -ChildPath ..) }
${function:....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) }
${function:.....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) }
${function:......} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) }
${function:z-} = { Set-Location - }
}