Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
nagy opened this issue Dec 19, 2023 · 1 comment · Fixed by #1458
Closed
1 task done

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

nagy opened this issue Dec 19, 2023 · 1 comment · Fixed by #1458

Comments

@nagy
Copy link

nagy commented Dec 19, 2023

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
@nagy nagy added the bug label Dec 19, 2023
@sharkdp
Copy link
Owner

sharkdp commented Dec 21, 2023

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());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants