manifoldco / promptui

Interactive prompt for command-line applications
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
6.07k stars 336 forks source link

Duplicate prompt line #129

Open ebrownewell opened 4 years ago

ebrownewell commented 4 years ago

Using the latest version of promptui (v0.6.0) and Go v1.13.4 on windows 10 I see constant duplicating prompt lines when running a very simple prompt:

image

and it does the same with or without the mask, and in any terminal I can get my hands on (wsl, powershell, etc).

Here's the code I'm using:

prompt := promptui.Prompt{
  Label:     "Password",
  Mask:      '*',
}
result, err := prompt.Run()

if err != nil {
  log.WithError(err).Error("Error getting password prompt information. ")
  return
}

log.Info("Result: " + result)
pinoylearnpython commented 4 years ago

Hi dipndawtz

I was stumbling upon this library as I'm trying to play around with this and noticed this it will cause to repeat the label and its value upon hitting the enter key.

At this "prompt.go", line 166, try to disable it and it should work and I raised a request to amend it or remove it. It works for me. Thank you

image

hpohl commented 4 years ago

Happens since v0.4.0.

desponda commented 4 years ago

I just ran into this issue myself

carbontwelve commented 4 years ago

I have just run into this issue today, could 2020 get any worse?

bseenu commented 4 years ago

Any update on this?

1lann commented 3 years ago

Likely caused by #148, #169 will resolve this