PowerShell_profile.ps1
1# This is using PowerShell Core (pwsh.exe not powershell.exe), with the included PSReadline module
2# History suggestions were added to PSReadline in v2.2.0
3# https://learn.microsoft.com/en-us/powershell/module/psreadline/set-psreadlineoption?view=powershell-7.5#-predictionsource
4
5Set-PSReadLineOption -PredictionSource HistoryAndPlugin
6Set-PSReadLineKeyHandler -Chord Tab -Function Complete
7Set-PSReadLineKeyHandler -Chord Ctrl+d -Function DeleteCharOrExit
8Set-PSReadLineKeyHandler -Chord UpArrow -Function HistorySearchBackward
9Set-PSReadLineKeyHandler -Chord DownArrow -Function HistorySearchForward
10Set-PSReadLineKeyHandler -Chord Shift+RightArrow -Function AcceptNextSuggestionWord