PasswordPrompt bug
Closed this issue · 2 comments
iikira commented
- 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.
- 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 commented
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 commented
alright...