dots-of-war/eggs/powershell/Microsoft.PowerShell_profile.ps1

19 lines
756 B
PowerShell
Raw Normal View History

2025-01-04 20:40:51 +01:00
if ($host.Name -eq "ConsoleHost")
{
Import-Module PSReadline
Set-PSReadLineKeyHandler -Chord Control+Delete -Function BackwardKillWord
Set-PSReadLineKeyHandler -Chord Control+Backspace -Function BackwardKillWord
Set-PSReadLineKeyHandler -Chord Control+RightArrow -Function NextWord
Set-PSReadLineKeyHandler -Chord Control+LeftArrow -Function BackwardWord
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler Key DownArrow -Function HistorySearchForward
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
Set-PSReadLineKeyHandler -Chord Control+c -Function RevertLine
#Set-PSReadlineKeyHandler -Chord Control+C -Function CancelLine
}
Invoke-Expression (&starship init powershell)