Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PasswordPrompt bug #103

Closed
iikira opened this issue Apr 6, 2018 · 2 comments
Closed

PasswordPrompt bug #103

iikira opened this issue Apr 6, 2018 · 2 comments

Comments

@iikira
Copy link

iikira commented Apr 6, 2018

  • Operating System: Mac
  • Terminal Emulator: Terminal.app
  • Bug behaviour

When the password prompt string is too long, and wrap to a new line, the input typed is displayed.
linerbug

  • Expected behaviour

The input typed is not displayed.

  • Complete sample that reproduces the bug
package main

import (
	"github.com/peterh/liner"
	"strings"
)

func main() {
	line := liner.NewLiner()
	line.PasswordPrompt(strings.Repeat("-", 200))
	line.Close()
}
@peterh
Copy link
Owner

peterh commented Apr 12, 2018

Whether password or not, any prompt that is wider than the terminal causes liner to use fallback mode.

Can I suggest printing the lines you want before the password prompt separately, and making sure you use a short string as the password prompt?

@iikira
Copy link
Author

iikira commented Apr 16, 2018

alright...

@peterh peterh closed this as completed May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants