package terminal_size

All checked builds pass
  1. Overview
  2. Docs
Get the dimensions of the terminal

Install

dune-project
 Dependency

Authors

Maintainers

Sources

terminal_size-0.2.0.tbz
sha256=d6b62cd28c4071ac85ca9528088745c124c9094efeae91722514736f9973b0fb
sha512=fd91266b156f52c28338fc8ba5c5c0626b93afa6388fb9e0f98d0f7c200ded02eac56af82b10a3da8d7ec2ef7a91a95fcb113f051a8ec077e155e2ffda75d1c0

Description

You can use this small library to detect the dimensions of the terminal window attached to a process.

Added to opam-repository:

README

Build Status

Terminal_size

What is it?

You can use this small ocaml library to detect the dimensions of the terminal window attached to a process. It contains the two following functions:

val get_rows : unit -> int option
val get_columns : unit -> int option

How does it work?

Usually, to get this information, one would open a pipe from tput cols or stty size and parsing the output. Instead, this uses the ioctl that these commands use, TIOCGWINSZ.

Dependencies (2)

  1. ocaml >= "4.08.0"
  2. dune >= "2.0.0"

Dev Dependencies (1)

  1. alcotest with-test

Optional Dependencies

None

Used by (2)

  1. progress < "0.2.0"
  2. why3find

Conflicts

None

Build status

Results of building terminal_size with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.2.0 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure