rust-cli / rexpect

.github/workflows/ci.yml
https://docs.rs/rexpect
MIT License
328 stars 56 forks source link

Set default terminal size to 80x25 #17

Closed tailhook closed 2 years ago

tailhook commented 4 years ago

It looks like otherwise the default is 0, which crashes some programs.

I would make it customizable, but I'm not sure how to make API for that.

Also see #10

philippkeller commented 4 years ago

thanks for the PR @tailhook and sorry that I didn't respond so far. I'm giving this project some love again, and would like to also look into this PR and maybe a way to customize the terminal size.

I'd like to play with it, what's your use case? or asked differently: what program crashes currently without the terminal size?

tailhook commented 4 years ago

I'd like to play with it, what's your use case? or asked differently: what program crashes currently without the terminal size?

This is the crash: https://github.com/edgedb/edgedb-cli/runs/666845514?check_suite_focus=true Note, the crash is actually in rustyline library. And that may involve some PR which isn't yet landed into a master.

Now as I'm thinking about it more, maybe it's better to fix rustyline to treat that as "infinite width". But being able to specify terminals size in rexpect makes sense anyway.

tailhook commented 4 years ago

Also see this this thread on the similar issue: https://github.com/containers/libpod/issues/351

matthiasbeyer commented 2 years ago

Hi! I am closing this PR now as it seems to be no longer relevant to you. Feel free to open a new one if you're still running into issues!