Skip to content

Query /dev/tty for the terminal size#130

Open
blawrence-ont wants to merge 1 commit intop-ranav:masterfrom
blawrence-ont:query-dev-tty-for-size
Open

Query /dev/tty for the terminal size#130
blawrence-ont wants to merge 1 commit intop-ranav:masterfrom
blawrence-ont:query-dev-tty-for-size

Conversation

@blawrence-ont
Copy link
Copy Markdown

The device file /dev/tty is available even if stdout is closed or redirected, in which case the width would have been reported as 0 rather than the size of the terminal that we're running in.

Tested on both macOS and Linux and behaves as expected.

The device file /dev/tty is available even if stdout is closed or
redirected, in which case the width would have been reported as 0
rather than the size of the terminal that we're running in.

Tested on both macOS and Linux and behaves as expected.
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.

1 participant