v.24.1New Feature

Automatically Disable ANSI Escape Sequences in Non-Terminal Outputs

Automatically disable ANSI escape sequences in Pretty formats if the output is not a terminal. Add new auto mode to setting output_format_pretty_color. #58614 (Shaun Struwig).
Automatically disables ANSI escape sequences for Pretty output formats when the output is not a terminal by introducing an auto mode for the output_format_pretty_color setting.

Why it matters

This feature solves the issue of unwanted ANSI color codes appearing in Pretty format outputs when redirected to non-terminal destinations such as files or pipelines, improving readability and preventing formatting artifacts.

How to use it

Set the output_format_pretty_color setting to auto to enable automatic detection and disabling of ANSI escape sequences for Pretty formats when output is not a terminal.