feat(pwsh): Windows Migration and optimize powershell scripts

This commit is contained in:
js0ny 2024-12-01 07:02:12 +00:00
parent 567c8d1b3b
commit 8306264bdb
12 changed files with 141 additions and 133 deletions

View file

@ -1,15 +1,14 @@
# ${function:~} = { Set-Location -Path ~ } cd is better
${function:...} = { Set-Location -Path ..\.. }
${function:....} = { Set-Location -Path ..\..\.. }
${function:.....} = { Set-Location -Path ..\..\..\.. }
${function:......} = { Set-Location -Path ..\..\..\..\.. }
${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:......} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) }
# Absolute navigation
${function:docs} = { Set-Location -Path ~/Documents }
${function:down} = { Set-Location -Path ~/Downloads }
${function:dt} = { Set-Location -Path ~/Desktop }
${function:mytmp} = { Set-Location -Path ~/Temp }
${function:one} = { Set-Location -Path ~/OneDrive }
${function:doku} = { Set-Location -Path ~/doku && Get-ChildItem }
${function:docs} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Documents") }
${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") }
Invoke-Expression (& { (zoxide init powershell | Out-String) })
Invoke-Expression (& { (zoxide init powershell | Out-String) })