nushell / nushell/reedline

Multiple prompt colors

Open
#597 8 comments 0 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

It would be very helpful if we could set different colors for different parts of a dynamic prompt string. Take the following prompt for example:

[current-message] account>

Most shells, editors, and cli tools would allow you to make current-message one color, the square brackets a different color, and account another color.

I can't do that with reedline currently without trying to disable its coloring effects entirely and manually inserting ansi escape sequences in Prompt::render_prompt_left.

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 by reading Prompt::render_prompt_left, the entry point named in the issue, and trace how dynamic prompt text is currently colored. Define the design for independently coloring prompt components such as current-message, brackets, and account without requiring manual ANSI escapes; done means those parts can receive different colors.

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.