Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sindresorhus/macos-terminal-size

Repository files navigation

macos-terminal-size

Get the terminal window size on macOS

Works even when run non-interactively, for example, in a child process or when piped.

Install

Download the binary and put it in /usr/local/bin.

Usage

$ terminal-size
143
24

Where 143 are the number of columns and 24 are the number of rows.

Comparison

$ tput cols
158
$ tput cols &> x; cat x
80
$ terminal-size
158
25
$ terminal-size &> x; cat x
158
25

Build

./build

Related

About

Get the terminal window size on macOS

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 4

AltStyle によって変換されたページ (->オリジナル) /