nushell / nushell/reedline

`reedline::prompt::base::Prompt` should be redesigned

Open
#526 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

As I already noted here, the current implementation for prompts does not behave well under certain conditions (e. g. if reedline::prompt::base::Prompt returns a string containing control characters i. e. line breaks and carriage returns or if )
and it is missing at least a specification for how certain features should work together (e.g. multiline input and completions)

image
Fig 1. Prompt::render_prompt_right returns a string with line break

image
Fig 2. the same as Fig 1. but in a different terminal

image
Fig 3. prompts can be longer than terminal width

image
Fig 4. it works with whitespace

(For none of the above have I resized the terminal window)

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 with reedline::prompt::base::Prompt and the discussion linked from issue #348. Reproduce the reported cases involving control characters, multiline input, completions, and prompts wider than the terminal in multiple terminal environments. Done means agreeing on the prompt behavior and specification before implementing the redesign.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.