coreutils
coreutils copied to clipboard
stty: add options to set and print terminal size
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>orstty 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.
GNU testsuite comparison:
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
GNU testsuite comparison:
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
Thanks :)
thanks for reviewing!