X Tutup
The Wayback Machine - https://web.archive.org/web/20201108074124/https://github.com/sharkdp/fd/pull/668
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

Support colorless help #668

Open
wants to merge 2 commits into
base: master
from
Open

Conversation

@xanonid
Copy link

@xanonid xanonid commented Oct 16, 2020

Closes: #600

@xanonid xanonid force-pushed the xanonid:support_colorless_help branch from e1b8215 to d1c0e4f Oct 20, 2020
Copy link
Owner

@sharkdp sharkdp left a comment

Thank you very much for your contribution!

@@ -1,10 +1,17 @@
use clap::{crate_version, App, AppSettings, Arg};

pub fn build_app() -> App<'static, 'static> {
let clap_color_setting =
if atty::is(atty::Stream::Stdout) && std::env::var_os("NO_COLOR").is_none() {

This comment has been minimized.

@sharkdp

sharkdp Oct 25, 2020
Owner

I think clap does an isatty check internally, because fd --help | cat is not colored at the moment. So I guess we could remove the atty::is(…) part here (as well as the build dependency)

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

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.
X Tutup