Make Powershell Great Again!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
606 B

# Set better CTRL bindings
Set-PSReadlineOption -EditMode Emacs
Set-PSReadlineKeyHandler "Ctrl+Delete" KillWord
Set-PSReadlineKeyHandler "Ctrl+Backspace" BackwardKillWord
Set-PSReadlineKeyHandler "Ctrl+LeftArrow" BackwardWord
Set-PSReadlineKeyHandler "Ctrl+RightArrow" NextWord
# Set the autocomplete handler to a menu one, similar to how ZSH does it
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
# Work around an RS5/PSReadline-2.0.0+beta2 bug (Spacebar is not marked Vital)
Set-PSReadlineKeyHandler "Shift+SpaceBar" -ScriptBlock {
[Microsoft.Powershell.PSConsoleReadLine]::Insert(' ')