Prediction `NextSuggestion` or similar binding that also works with inline predictions

Open
#3,362 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
cli

Research direction

Start by tracing the existing NextSuggestion and PreviousSuggestion bindings and the inline-prediction handling in PSReadLine. Compare their behavior with list view, then verify that the chosen binding approach lets users move through inline predictions without switching views; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Description

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

Trying out the newly-default inline prediction, and particularly combined with https://github.com/PowerShell/CompletionPredictor, I wanted to have Tab and Shift+Tab work with the predictions rather than the completions, so that I get history (and any other plugins) included in the Tab-complete keyboard habit for free, without losing screen real-estate to the list-view (or having to toggle F2 every time I want to choose a different prediction).

However, the NextSuggestion and PreviousSuggestion bindings only work in list view. They default to unbound, so the arrow keys you naturally use in the prediction list view are clearly magic for list view, not using those bindings.

Proposed technical implementation details (optional)

Either

  • NextSuggestion and PreviousSuggestion should work for inline predictions too (which doesn't seem too dangerous a change to me because they default to unbound); or
  • another pair of Prediction key bindings that work with inline predictions, e.g. NextInlineSuggestion and PreviousInlineSuggestion.

I'm clearly assuming that the underlying mechanism is the same so this would be a relatively easy feature to add, but that's just an assumption.

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.