Shell completion after unexpected word messes up the prompt

Open
#596 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
cli

Research direction

Start by reproducing the issue with mise help followed by shell completion and observe how the multi-row usage error interacts with the prompt. Trace the shell-completion error path and determine how its output is rendered; done means the error no longer garbles the prompt or overwrites the current input.

Written by the indexing model from the issue text.

Description

When I attempt to perform shell completion after an unexpected word in an argument with mise, the verbose error message from usage messes up the shell prompt.

For example:

$ mise help <tab>Error:   × unexpected word: help

mise

After pressing typing mise help and pressing tab, a multi-row error message is printed, and the prompt, including the current input, becomes garbled and overwritten. This makes it really hard to figure out what's already typed and what's new.

Dominant language
Rust
Stars
1k
Forks
59
Avg merge
5h 58m
Merged PRs (30d)
362

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 jdx/usage

All issues in jdx/usage

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.