Disable italics in PSReadLine autosuggestions

This commit is contained in:
Kenneth Benzie 2024-08-01 20:24:45 +01:00
parent 426aba161e
commit b129a0e308

View File

@ -63,6 +63,8 @@ Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
# Autosuggestion bindings for PSReadLine 2.1.0+ # Autosuggestion bindings for PSReadLine 2.1.0+
Set-PSReadLineKeyHandler -Chord "Ctrl+p" -Function ForwardChar Set-PSReadLineKeyHandler -Chord "Ctrl+p" -Function ForwardChar
Set-PSReadLineKeyHandler -Chord "Ctrl+o" -Function ForwardWord Set-PSReadLineKeyHandler -Chord "Ctrl+o" -Function ForwardWord
# Use grey but not italic for autosuggestion highlights
Set-PSReadLineOption -Colors @{ InlinePrediction = "$([char]0x1b)[38;5;238m" }
# Change cursor shape based on what Vi mode the line editor is in. # Change cursor shape based on what Vi mode the line editor is in.
# Tested and works with PowerShell 5.1 # Tested and works with PowerShell 5.1