koinos / koinos/koinos-cli

[BUG]: Interactive CLI does not handle pasted newlines well

Open
#124 2 comments 0 reactions 0 assignees View on GitHub
bug task
Dominant language
Go
Stars
7
Forks
6
PR merge metrics
No merged PRs in 30d

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current behavior

Pasting multiline content into the interactive prompt makes the prompt disappear and you only see the last line of content. Backspacing the content reveals that it's all there, but you don't see the prompt again until you get to the top line.

### Expected behavior

Pasting multiline content should keep the prompt visible along with each line of content. Same as your typical command prompt.

### Steps to reproduce

1. Open terminal
2. run koinos-cli in interactive mode
3. copy multiple lines of text into your clipboard (from anywhere)
4. paste into koinos-cli

Command prompt should disappear and you only see the last line of what you pasted.

5. backspace until you hit the top line and see the prompt again.

### Environment

```markdown
- OS: Mac OS 11.6.8
- Terminal: zsh 5.8 (x86_64-apple-darwin20.0)
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the paste behavior in koinos-cli's interactive mode using the terminal and multiline clipboard content described in the issue. Trace the interactive prompt's input and line-rendering entry point, then verify that the prompt remains visible for every pasted line and while backspacing through the content.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.