Terminal IO abstraction for fullscreen, interactive applications.
Inline output
These operations do not assume exclusive access to the output. This means that they can be combined with other means of producing output. At the same time, it means that they are affected by the current terminal state, and that this state is not tracked.
output_image_size ?cap ?fd f is output_image ?cap ?fd (f size) where size are fd's current output dimensions.
If fd is not backed by a tty, as a matter of convenience, f is applied to (80, 24). Use Unix.isatty or winsize to detect whether the output has a well-defined size.
When not provided, capabilities are auto-detected, by checking that the output is a tty, that the environment variable $TERM is set, and that it is not set to either "" or "dumb". If these conditions hold, ANSI escapes are used. Otherwise, no escapes are used.