heapwolf / prompt-sync

a synchronous prompt for node.js
MIT License
211 stars 42 forks source link

Prompt repeating on Input #66

Open RoboticSquid opened 1 year ago

RoboticSquid commented 1 year ago

Whenever inputting a response into the prompt, it repeats the prompt. I have tried everything in my code to get try and it get it to not repeat, but it has not be a fruitful attempt so far. I was wondering if this was a feature of the package or a bug, if it is a feature would there be anyway to disable it?

heliomar-pena commented 7 months ago

Same error here. Here is my code if that helps in something imagen imagen

He's into a loop, not sure if that affects, but other prompts on the same loop works fine. Just is failing that line of code

imagen

heliomar-pena commented 7 months ago

I just noticed that that is the longer prompt I have. And then concluded that the problem happens when your prompt occupies more than 2 lines. When it is a one line prompt then it works fine

heliomar-pena commented 7 months ago

This PR should solve the problem, but seems like this project is not longer maintenance :( https://github.com/heapwolf/prompt-sync/pull/45

shortad commented 2 months ago

I've noticed a similar issue with single-line inputs using standard strings (not template literals) when using Git Bash - 'enter' doesn't actually submit the user input, instead the prompt and previous input just repeat; switch to PowerShell or WSL and it works fine though