Skip to content
Myr

Use nu-ansi-term instead of ansi-term

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

Because ansi-term is no longer maintained.

authored by Thayne McCombs · committed by Thayne McCombs · parent 2aa966c · Browse files · 4 files+30 added−19 removed
This commit

State

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

Trailers

  • Relates-To: #1188

Diff stats

4 files+30 added−19 removed

  • other:+30 added−19 removed

4 files+30 added−19 removed

modified:src/main.rs+1 added-1 removed
210 unmodified lines
211 let owner_constraint: Option<OwnerFilter> = opts.owner.and_then(OwnerFilter::filter_ignore);212213 #[cfg(windows)]214 let ansi_colors_support =215 ansi_term::enable_ansi_support().is_ok() || std::env::var_os("TERM").is_some();215 nu_ansi_term::enable_ansi_support().is_ok() || std::env::var_os("TERM").is_some();216 #[cfg(not(windows))]217 let ansi_colors_support = true;218219 let interactive_terminal = atty::is(Stream::Stdout);
248 unmodified lines
modified:src/output.rs+3 added-3 removed
44 unmodified lines
45 write!(46 stdout,47 "{}",48 style49 .map(Style::to_ansi_term_style)49 .map(Style::to_nu_ansi_term_style)50 .unwrap_or_default()51 .paint(&config.actual_path_separator)52 )?;53 }
30 unmodified lines
84 }8586 let style = ls_colors87 .style_for_indicator(Indicator::Directory)88 .map(Style::to_ansi_term_style)88 .map(Style::to_nu_ansi_term_style)89 .unwrap_or_default();90 write!(stdout, "{}", style.paint(parent_str))?;91 }9293 let style = entry94 .style(ls_colors)95 .map(Style::to_ansi_term_style)95 .map(Style::to_nu_ansi_term_style)96 .unwrap_or_default();97 write!(stdout, "{}", style.paint(&path_str[offset..]))?;9899 print_trailing_slash(
61 unmodified lines
modified:Cargo.lock+20 added-13 removed
19 unmodified lines
20 "libc",21]2223[[package]]24name = "ansi_term"25version = "0.12.1"26source = "registry+https://github.com/rust-lang/crates.io-index"27checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"28dependencies = [29 "winapi",30]3132[[package]]24name = "anyhow"25version = "1.0.66"26source = "registry+https://github.com/rust-lang/crates.io-index"27checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"
272 unmodified lines
300[[package]]301name = "fd-find"302version = "8.5.3"303dependencies = [313 "ansi_term",304 "anyhow",305 "argmax",306 "atty",307 "chrono",
12 unmodified lines
320 "libc",321 "lscolors",322 "nix 0.24.2",323 "normpath",324 "nu-ansi-term",325 "num_cpus",326 "once_cell",327 "regex",328 "regex-syntax",
193 unmodified lines
522]523524[[package]]525name = "lscolors"535version = "0.12.0"526version = "0.13.0"527source = "registry+https://github.com/rust-lang/crates.io-index"537checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1"528checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2"529dependencies = [539 "ansi_term",530 "nu-ansi-term",531]532533[[package]]534name = "memchr"
33 unmodified lines
568 "winapi",569]570571[[package]]572name = "nu-ansi-term"573version = "0.46.0"574source = "registry+https://github.com/rust-lang/crates.io-index"575checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"576dependencies = [577 "overload",578 "winapi",579]580581[[package]]582name = "num-integer"583version = "0.1.45"584source = "registry+https://github.com/rust-lang/crates.io-index"585checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
33 unmodified lines
619source = "registry+https://github.com/rust-lang/crates.io-index"620checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"621622[[package]]623name = "overload"624version = "0.1.1"625source = "registry+https://github.com/rust-lang/crates.io-index"626checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"627628[[package]]629name = "proc-macro-error"630version = "1.0.4"631source = "registry+https://github.com/rust-lang/crates.io-index"632checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
492 unmodified lines
modified:Cargo.toml+6 added-2 removed