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
A new predictive intellisense feature will be added to PSReadLine 2.2.0-beta1, including 2 major functionalities:
Add the ListView to the predictive intellisense feature in PSReadLine.
Hook up PSReadLine with the CommandPrediction APIs introduced in PS 7.1, so when using PSReadLine with PS 7.1, a user can import a predictor module and PSReadLine can render the suggestions returned from the predictor module.
There will be 4 options for the PredictionSource: None, History, Plugin, HistoryAndPlugin.
None -- disable the predictive intellisense feature, which is the default.
History -- enable the predictive intellisense feature, and use the PSReadLine history as the only source.
Plugin -- enable the predictive intellisense feature, and use the plugins (CommandPrediction) as the only source.
HistoryAndPlugin -- enable the predictive intellisense feature, and use both history and plugin as the sources.
There will be 2 views for the PredictionViewStyle: InlineView and ListView.
InlineView -- the style as existing today, similar as in fish shell and zsh.
ListView -- suggestions are rendered in a drop down list, and users can select using UpArrow and DownArrow.
Two more color settings were added to support customization of the ListView:
ListPredictionColor -- set color for the leading > character and the trailing source name, e.g. [History]. By default, it uses DarkYellow as the foreground color.
ListPredictionSelectedColor -- set color for indicating a list item is selected. By default, it uses DarkBlack as the background color.
Summary of the new document or enhancement
ListView
and also hook up with theCommandPrediction
APIs introduced in PS 7.1 PowerShell/PSReadLine#1909Description of what changed
A new predictive intellisense feature will be added to PSReadLine 2.2.0-beta1, including 2 major functionalities:
ListView
to the predictive intellisense feature in PSReadLine.CommandPrediction
APIs introduced in PS 7.1, so when using PSReadLine with PS 7.1, a user can import a predictor module and PSReadLine can render the suggestions returned from the predictor module.There will be 4 options for the
PredictionSource
:None
,History
,Plugin
,HistoryAndPlugin
.None
-- disable the predictive intellisense feature, which is the default.History
-- enable the predictive intellisense feature, and use the PSReadLine history as the only source.Plugin
-- enable the predictive intellisense feature, and use the plugins (CommandPrediction
) as the only source.HistoryAndPlugin
-- enable the predictive intellisense feature, and use both history and plugin as the sources.There will be 2 views for the
PredictionViewStyle
:InlineView
andListView
.InlineView
-- the style as existing today, similar as in fish shell and zsh.ListView
-- suggestions are rendered in a drop down list, and users can select using UpArrow and DownArrow.Two more color settings were added to support customization of the
ListView
:ListPredictionColor
-- set color for the leading>
character and the trailing source name, e.g.[History]
. By default, it usesDarkYellow
as the foreground color.ListPredictionSelectedColor
-- set color for indicating a list item is selected. By default, it usesDarkBlack
as the background color.For more details and more screenshot/GIFs, please see the PR description of PowerShell/PSReadLine#1909.
The text was updated successfully, but these errors were encountered: