Last active
May 25, 2023 10:54
-
-
Save jhoneill/cd5a7114335d25cb8f0b6281bf73fb83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-PSReadlineOption -PredictionSource History | |
Set-PSReadlineOption -BellStyle None -EditMode Windows -WordDelimiters "`~!£#%^&*()=+[{]}\|;:'`",.<>/?" | |
Set-PSReadLineOption -Colors @{'Parameter'= "$([char]27)[97m"; 'operator'= "$([char]27)[97m"} #defaults are too dark use $([char]27) because `e doesn't work on PS 5. | |
Set-PSReadLineKeyHandler -Key Ctrl+RightArrow -ScriptBlock { | |
param($key, $arg) | |
$line = $null | |
$cursor = $null | |
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$line, [ref]$cursor) | |
if ($cursor -lt $line.Length) { | |
[Microsoft.PowerShell.PSConsoleReadLine]::ForwardWord($key, $arg) | |
} | |
else {[Microsoft.PowerShell.PSConsoleReadLine]::AcceptNextSuggestionWord($key, $arg)} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment