term size

For platform.

Returns a record containing the number of columns (width) and rows (height) of the terminal.

Command Type

built-in

Signature

> term size {flags}

Input/output types:

input output
nothing record<columns: int, rows: int>

Examples

Return the columns (width) and rows (height) of the terminal.

> term size

Return the columns (width) of the terminal.

> (term size).columns

Return the rows (height) of the terminal.

> (term size).rows

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.