Skip to content
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

The new predictive intellisense feature in PSReadLine #6812

Closed
daxian-dbw opened this issue Oct 28, 2020 · 0 comments · Fixed by #6944
Closed

The new predictive intellisense feature in PSReadLine #6812

daxian-dbw opened this issue Oct 28, 2020 · 0 comments · Fixed by #6944
Assignees
Labels
area-psreadline Area - PSReadline module
Milestone

Comments

@daxian-dbw
Copy link
Contributor

Summary of the new document or enhancement

Description of what changed

A new predictive intellisense feature will be added to PSReadLine 2.2.0-beta1, including 2 major functionalities:

  1. Add the ListView to the predictive intellisense feature in PSReadLine.
  2. 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.

For more details and more screenshot/GIFs, please see the PR description of PowerShell/PSReadLine#1909.

@daxian-dbw daxian-dbw added the issue-doc-idea Issue - request for new content label Oct 28, 2020
@sdwheeler sdwheeler added hold-for-pr Waiting - for PR merge area-psreadline Area - PSReadline module and removed issue-doc-idea Issue - request for new content labels Oct 28, 2020
@sdwheeler sdwheeler added this to the Future milestone Oct 28, 2020
@sdwheeler sdwheeler removed the hold-for-pr Waiting - for PR merge label Nov 17, 2020
@sdwheeler sdwheeler modified the milestones: Future, 7.2.0 Nov 17, 2020
@sdwheeler sdwheeler self-assigned this Nov 23, 2020
sdwheeler added a commit that referenced this issue Nov 23, 2020
* Fixes #6812 - updates for PSReadLine 2.2.0-beta1

* feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-psreadline Area - PSReadline module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants