8000 stty: add options to set and print terminal size by willshuttleworth · Pull Request #8221 · uutils/coreutils · GitHub
[go: up one dir, main page]

Skip to content

stty: add options to set and print terminal size #8221

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

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

willshuttleworth
Copy link
Contributor

fixes for #3859. adds options for setting the size of the terminal's rows and columns, and printing the current size.

  • stty rows <n>
  • stty columns <n> or stty cols <n>
  • stty size

i did add some new unsafe blocks, as ioctl calls are needed to get and set terminal size. i couldn't find documentation of what row/col sizes are accepted by GNU's stty, but i did some testing and am matching their behavior. i also added tests to confirm this behavior.

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@cakebaker cakebaker merged commit 39c793c into uutils:main Jun 19, 2025
75 checks passed
@cakebaker
Copy link
Contributor

Thanks :)

@willshuttleworth
Copy link
Contributor Author

thanks for reviewing!

@willshuttleworth willshuttleworth deleted the stty-size branch June 23, 2025 19:42
< 632E input type="hidden" data-csrf="true" name="authenticity_token" value="Yt6Aezp09uOo8IoSE0BW7e1wzDhy66D3PfoabrDYEN2Apppqme6yeEOD2x2Oa34hSd37iiGTboU93NAFU1KcBw==" />
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

Successfully merging this pull request may close these issues.

2 participants
0