Skip to main content

Module terminal

Module terminal 

Source
Expand description

Colored output configuration and interactive terminal detection.

Manages color choice via termcolor honoring precedence:

  1. Flag --no-color da CLI (maior prioridade).
  2. NO_COLOR environment variable (see https://no-color.org).
  3. CLICOLOR_FORCE=1 environment variable (force colors even without TTY).
  4. TTY detection (colors only if stdout is an interactive terminal).
  5. Fallback: no color.

Functionsยง

color_choice
Returns the configured color choice.
initialize
Initializes terminal color configuration.
is_interactive
Returns true if the process is running in an interactive terminal (TTY).