-
Notifications
You must be signed in to change notification settings - Fork 316
Add basic support for inline predictive suggestion #1496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@lzybkr @SteveL-MSFT Gentle ping :) Please take a look when you have time. Thanks! |
@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. |
@lzybkr I think I addressed all comments. A summary:
|
@lzybkr All your comments are addressed. The refactoring changes to
|
@daxian-dbw I had a question about this. There is the new |
@JustinGrote The function |
@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 History Now, 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 |
@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? |
@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 black
color\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>' }
-PredictionSource
is added toSet-PSReadLineOption
, currently with the optionsNone
andHistory
.The value is
None
by 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.AcceptSuggestion
andAcceptNextSuggestionWord
bindable.Microsoft Reviewers: Open in CodeFlow