c-bata / go-prompt

Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
https://godoc.org/github.com/c-bata/go-prompt
MIT License
5.27k stars 346 forks source link

Add minimal terminal size if ioctl call fails to retrieve size. #264

Open ChriMarMe opened 1 year ago

ChriMarMe commented 1 year ago

Signed-off-by: Christopher Meis christopher.meis@9elements.com

ChriMarMe commented 1 year ago

This will provide minimal terminal size under conditions in which the ioctl call will return 0,0 for row, col size.

Should allow prompt with tab completion in docker and qemu with -append "console=ttyS0"-nographics

ChriMarMe commented 1 year ago

@c-bata Can I get a review pretty please?