From cc02ed0914becc813ed9d412fa122d39471e8e7d Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 18 Nov 2022 11:54:31 +0000 Subject: [PATCH] Add PSReadLine bindings for Fish style autosuggestions --- profile.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profile.ps1 b/profile.ps1 index 30aaf56..0661f22 100644 --- a/profile.ps1 +++ b/profile.ps1 @@ -20,6 +20,10 @@ Set-PSReadLineKeyHandler -Chord 'Ctrl+Oem4' -Function ViCommandMode # Enable menu style tab completions. https://stackoverflow.com/a/37715242 Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete +# Autosuggestion bindings for PSReadLine 2.1.0+ +Set-PSReadLineKeyHandler -Chord "Ctrl+p" -Function ForwardChar +Set-PSReadLineKeyHandler -Chord "Ctrl+o" -Function ForwardWord + # Change cursor shape based on what Vi mode the line editor is in. # Tested and works with PowerShell 5.1 # NOTE: Requires: Install-Module PsReadline -Scope CurrentUser -Force