sharkdp/fd

[BUG] Colorized output in `-l` despite `NO_COLOR=1` and `LS_COLORS=`

nagy opened this issue · 1 comments

nagy commented

Checks

  • I have read the troubleshooting section and still think this is a bug.

Describe the bug you encountered:

Despite specifying NO_COLOR=1 and LS_COLORS= , I still see colorized output when using the -l flag.

$ LS_COLORS= NO_COLOR=1 fd null /dev/ -l
crw-rw-rw- 1 root root 1, 3 Dec 11 15:40 /dev/null

In this example, the final /dev/null part is colorized. With --color never it works though.

Describe what you expected to happen:

Monochrome output

What version of fd are you using?

fd 9.0.0

Which operating system / distribution are you on?

Linux

Thank you for reporting this.

This needs to be fixed here:

fd/src/main.rs

Line 328 in 266311c

let color_arg = format!("--color={}", opts.color.as_str());