mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
fix(pwsh, z): Fix zoxide work with pwsh
This commit is contained in:
parent
0803e9d8b2
commit
d9aa8fafdb
2 changed files with 19 additions and 17 deletions
|
|
@ -49,3 +49,22 @@ $Colors = @{
|
|||
|
||||
# Set the colours
|
||||
Set-PSReadLineOption -Colors $Colors
|
||||
|
||||
# Smarter cd
|
||||
# Init zoxide apter starship to avoid conflicts
|
||||
# https://github.com/ajeetdsouza/zoxide/issues/723
|
||||
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 - }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue