Opt-in Mode for prediction results

Open
#3,887 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, powershell
Domain
cli

Research direction

Start by reading related issues #3581, #3607, and #2504, then inspect how prediction view options and key handlers are currently exposed. Done should include an opt-in prediction setting, a defined key-triggered ListView flow, and agreed behavior for accessibility and predictor timeouts.

Written by the indexing model from the issue text.

Description

Area-Predictors Issue-Enhancement Needs-Triage :mag:
Prerequisites
  • Write a descriptive title.
Description of the new feature/enhancement

It may eventually make sense to have a predictor option to make listview results be "asked" for by the user or triggered by a keyhandler. It could solve two problems:

  1. Accessibility, (after we fix screen reader issues currently), it would be easier to navigate prediction results via screen reader if the user is able to explicitly opt-in to getting the results and have some kind of indicator that prediction results are available.
  2. Off box calls to predictors - since the user is opting in to getting predictor results, we could allow for a longer time out as the user is specifically asking for this
Proposed technical implementation details (optional)

Include a PSreadLine option for a getting predictions opt in. I.e something like

Set-PSReadLineOption -PredictionViewStyle OptIn

and then when a user types something, they can press a key to get ListView to render based on currently typed content:

PS>Get-
<Presses F5>
<-/9>                                                                   <History(3) Az Predictor(6)>
> Get-alias                                                                                [History]
> Get-ChildItem                                                                            [History]
> Get-ChildItem | Show-ObjectTree                                                          [History]
> Get-AzSubscription                                                                  [Az Predictor]
> Get-AzResourceGroup                                                                 [Az Predictor]
> Get-AzRoleAssignment -Scope '/subscriptions/00000000-0000-0000-0000-00000000000000… [Az Predictor]
> Get-AzVM                                                                            [Az Predictor]
> Get-AzStorageAccount -Name 'ContosoStorage' -ResourceGroupName 'ContosoResourceGro… [Az Predictor]
> Get-AzKeyVaultSecret -Name 'secret*' -VaultName 'keyvault01'                        [Az Predictor]

Some clearer naming may be required.. 😄

Related issues: #3581 #3607 #2504

Dominant language
C#
Stars
4.4k
Forks
341
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/PSReadLine

All issues in PowerShell/PSReadLine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.