Allow specifying terminal size
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 391
- Forks
- 69
- Avg merge
- 1d 34m
- Merged PRs (30d)
- 2
Description
Hi, this is a follow-up for #17. Basically I would like to be able to set the terminal size for the spawned process.
My use case is as follows: I'm using rexpect to create integration tests for my full-screen TUI app (like vim), where I launch the program, send some keystrokes to it, and check that the printed characters are as expected. The layout of my app will depend on the terminal size, and for example some elements are not drawn at all if the size is zero. Currently I can't test my app properly without setting the terminal size.
Currently, my program actually crashes with a zero-size terminal, which I should probably handle, but I am still unable to test the screen contents.
(As another sidenote, this issue didn't come up before because crossterm (the library I'm using for the TUI) used to check if the size from /dev/tty (set by rexpect) is zero, and if it was, it used tput to query the terminal size instead. However, after an update, this check was removed and it returns a zero-size terminal now, which breaks my tests.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the follow-up context in #17 and inspect how rexpect spawns processes and configures the terminal exposed through /dev/tty. Consider the crossterm zero-size behavior described in the issue and define how callers specify the spawned process's terminal size. Done means integration tests can set a nonzero size and inspect the resulting full-screen output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100