nushell / nushell/reedline

Overflow in completer

Open
#595 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-API A-Completions bug
Dominant language
Rust
Stars
818
Forks
249
Avg merge
4d 14h
Merged PRs (30d)
30

Description

When writing the completion system with reedline::Completer, I stumbled across a problem:

If I say have a path in the list of completions that's larger than the terminal's width, it overflows and makes the whole completion's behaviour messy. Notably, it will redraw the entire completion list every time another option is selected.

Would it be possible to add a new struct option that would allow to provide a text to display AND a suggestion content? The former would be displayed in the user's terminal, while the second would be the output content.

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.

Research direction

Start at the reedline::Completer entry point and trace how completion display text is rendered and how selecting options triggers redraws. Done means long completion paths no longer overflow or cause messy full-list redraws, while the displayed text can differ from the suggestion content.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.