Repository navigation
Add basic support for inline predictive suggestion - #1496
Conversation
|
Jason Shirk (@lzybkr) Steve Lee (@SteveL-MSFT) Gentle ping :) Please take a look when you have time. Thanks! |
|
Jason Shirk (@lzybkr) I'm not sure what these 2 comments are referring to: #1496 (comment) #1496 (comment). Can you please clarify them a bit? Other than that, I'm almost done addressing the comments, and will push the changes tomorrow. |
|
Jason Shirk (@lzybkr) I think I addressed all comments. A summary:
|
|
Jason Shirk (@lzybkr) All your comments are addressed. The refactoring changes to
|
|
Dongbo Wang (@daxian-dbw) I had a question about this. There is the new |
|
Justin Grote (@JustinGrote) The function |
|
Sandeep Sharma (@nippyin) add it to your |
|
|
The syntax is the same - just put that command in your profile script located at this path It will be a bit different for you (different username at least). If the file doesn't exist, create it. Then place this line in the file: Set-PSReadLineOption -PredictionSource HistoryNow, whenever you start PowerShell, it will have this setting configured. |
this is nice, however is there VScode settings for this where we can set the parameter value as History? something similar to "powershell.codeFormatting.autoCorrectAliases": true |
|
The above would apply to all PowerShell hosts including the VSCode terminal and PS Integrated Console. To be clear, this is PSReadLine module configuration - not specific to VSCode. That said, if for some reason you only want this setting configured in the PS Integrated Console in VSCode, then put the command in the PSIC's profile script: |
|
This is a really nice feature, many thanks. Is it not possible to have |
|
Mustafa Mohamad (@musm) you can customize the keybindings |
|
Right now mine is set to It looks like you need to set |
|
Hello, I saw Jason Helmick showing PredictionViewStyle during the session with Jeffrey on Ignite, but I don't see that feature anywhere - even in the RC. Will this be implemented at all? |
|
Svilen (@SSvilen) my understanding is that it is on a private branch and will surface for 2.2 |

This PR is to merge the existing predictive suggestion changes to the master branch.
Changes were refactored and cleaned up. Also tests are added.
dark blackcolor\x1b[38;5;238m, which works OK with a black background.You can change it by running
Set-PSReadLineOption -Colors @{ Prediction = '<your-choice-of-color>' }-PredictionSourceis added toSet-PSReadLineOption, currently with the optionsNoneandHistory.The value is
Noneby default, meaning that the predictive suggestion feature is disabled by default.A user can enable the prediction feature by set it to
History. The feature cannot be enabled when the console output doesn't support VT.AcceptSuggestionandAcceptNextSuggestionWordbindable.Microsoft Reviewers: Open in CodeFlow