Anansi v0.0.2 Anansi

Utilities to generate ANSI control code instructions.

ANSI escape codes are strings that can be sent to the terminal to instruct it on how to control its screen, pager, cursor, and the formatting, font, and color of the text it displays.

When these instructions are written to STDOUT, they affect the way the terminal behaves.

Summary

Functions

Detects if ANSI is currently supported (STDIN and STDOUT are ttys)

Generates an instruction from the given codes and terminal code

Generates an ANSI instruction that applies the given setting to control

Functions

enabled?()

Detects if ANSI is currently supported (STDIN and STDOUT are ttys).

escape(codes \\ [], terminal)

Generates an instruction from the given codes and terminal code.

instruction(control, setting)

Generates an ANSI instruction that applies the given setting to control.