You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Item 1, it does appear like the Parameter and Inline Suggestion are the same. Could check Get-PSReadlineOption. I do see the italics difference.
For Item 2, it appears you are correct, there isn't a way to only dismiss the suggestion. .RevertLine or Escape clear the entire line.
Item 3, accept next suggestiong word, can be implemented like the below. I'm in Vi edit mode so one can remove the -ViMode Insert portion if so inclined and of course change the -Chord.
#region For part way completion of History PredictionSourceSet-PSReadLineKeyHandler-Chord 'Ctrl+Y'-BriefDescription 'NextWordAndAcceptNextSuggestionWord'-Description 'Move cursor one word to the right in the current editing line and accept the next word in suggestion when it''s at the end of current editing line'-ViMode Insert -ScriptBlock {
param($key,$arg)
$line=$null$cursor=$null
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$line, [ref]$cursor)
if ($cursor-lt$line.Length) {
[Microsoft.PowerShell.PSConsoleReadLine]::NextWord($key,$arg)
} else {
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptNextSuggestionWord($key,$arg)
}
}
#endregion
Activity
sharpchen commentedon Jun 28, 2026
It's not the same color, you can test it on windows default conhost.
Windows Terminal has inappropriate color map for this.
mattcargile commentedon Jul 28, 2026
For Item 1, it does appear like the Parameter and Inline Suggestion are the same. Could check
Get-PSReadlineOption. I do see the italics difference.For Item 2, it appears you are correct, there isn't a way to only dismiss the suggestion.
.RevertLineorEscapeclear the entire line.Item 3, accept next suggestiong word, can be implemented like the below. I'm in Vi edit mode so one can remove the
-ViMode Insertportion if so inclined and of course change the-Chord.