Skip to content

$env.config.table.show_empty ignores $env.config.use_ansi_coloringย #14896

Open
@ocitrev

Description

Describe the bug

When $env.config.table.show_empty is set to true and $env.config.use_ansi_coloring is set to false. The empty table contains ansi escape color codes.

How to reproduce

$env.config.use_ansi_coloring = false
$env.config.table.show_empty = true
~> []
๏ฟฝ[37mโ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ๏ฟฝ[0m
๏ฟฝ[37mโ”‚๏ฟฝ[0m ๏ฟฝ[2mempty list๏ฟฝ[0m ๏ฟฝ[37mโ”‚๏ฟฝ[0m
๏ฟฝ[37mโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ๏ฟฝ[0m

Expected behavior

Empty table should not have ansi color codes

~> []
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ empty list โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Configuration

key value
version 0.101.0
major 0
minor 101
patch 0
branch
commit_hash fb26109
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.81.0 (eeb90cda1 2024-09-04)
rust_channel 1.81.0-x86_64-pc-windows-msvc
cargo_version cargo 1.81.0 (2dbb1af80 2024-08-20)
build_time 2024-12-22 15:52:47 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash
installed_plugins

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions