Skip to content
Myr

Use NO_COLOR env variable check also for help screen

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by xanonid · committed by David Peter · parent 6830b3d · Browse files · 1 file+8 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−1 removed

  • other:+8 added−1 removed

1 file+8 added−1 removed

modified:src/app.rs+8 added-1 removed
1use clap::{crate_version, App, AppSettings, Arg};23pub fn build_app() -> App<'static, 'static> {4 let clap_color_setting =5 if std::env::var_os("NO_COLOR").is_none() {6 AppSettings::ColoredHelp7 } else {8 AppSettings::ColorNever9 };1011 let mut app = App::new("fd")12 .version(crate_version!())13 .usage("fd [FLAGS/OPTIONS] [<pattern>] [<path>...]")7 .setting(AppSettings::ColoredHelp)14 .setting(clap_color_setting)15 .setting(AppSettings::DeriveDisplayOrder)16 .after_help(17 "Note: `fd -h` prints a short and concise overview while `fd --help` gives all \18 details.",
571 unmodified lines