Just press -> (right arrow) key
If you want to change key bindings:
source: https://devblogs.microsoft.com/powershell/announcing-psreadline-2-1-with-predictive-intellisense/
Key Bindings for Predictions
Key bindings control cursor movement and additional features within the prediction. To support users running Predictive IntelliSense on multiple platforms, key bindings are user-settable from the command line or your profile script.
PSReadLine
contains functions to navigate and accept predictions. As an example, to accept a displayed prediction, PSReadLine contains functions:
- AcceptSuggestion – Accept the current inline suggestion
- AcceptNextSuggestionWord – Accept the next word of the inline suggestion
AcceptSuggestion
is built within ForwardChar
, which by default is bound to RightArrow. Pressing RightArrow accepts an inline suggestion when the cursor is at the end of the current line.
AcceptNextSuggestionWord
is built within the function ForwardWord
, which can be bound with Ctrl+f by Set-PSReadLineKeyHandler -Chord "Ctrl+f" -Function ForwardWord
. Pressing Ctrl+f accepts the next word of an inline suggestion when the cursor is at the end of current editing line.
As a user, you can bound other keys to AcceptSuggestion
and AcceptNextSuggestionWord
for similar functionalities. Search for ForwardCharAndAcceptNextSuggestionWord
in SamplePSReadLineProfile.ps1
for an example to make RightArrow accept the next word from inline suggestion, instead of the whole suggestion line.
List of additional suggested key bindings defined in PSReadLine SamplePSReadLineProfile.ps1