Skip to content
Myr

Merge pull request #1192 from tmccombs/ansi-term-deprecated

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

Use nu-ansi-term instead of ansi-term

authored by Tavian Barnes · committed by GitHub · parents 4a66d8f, d441516 · 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.

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"
281 unmodified lines
309[[package]]310name = "fd-find"311version = "8.5.3"312dependencies = [322 "ansi_term",313 "anyhow",314 "argmax",315 "atty",316 "chrono",
12 unmodified lines
329 "libc",330 "lscolors",331 "nix 0.24.2",332 "normpath",333 "nu-ansi-term",334 "num_cpus",335 "once_cell",336 "regex",337 "regex-syntax",
196 unmodified lines
534]535536[[package]]537name = "lscolors"547version = "0.12.0"538version = "0.13.0"539source = "registry+https://github.com/rust-lang/crates.io-index"549checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1"540checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2"541dependencies = [551 "ansi_term",542 "nu-ansi-term",543]544545[[package]]546name = "memchr"
33 unmodified lines
580 "winapi",581]582583[[package]]584name = "nu-ansi-term"585version = "0.46.0"586source = "registry+https://github.com/rust-lang/crates.io-index"587checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"588dependencies = [589 "overload",590 "winapi",591]592593[[package]]594name = "num-integer"595version = "0.1.45"596source = "registry+https://github.com/rust-lang/crates.io-index"597checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
33 unmodified lines
631source = "registry+https://github.com/rust-lang/crates.io-index"632checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"633634[[package]]635name = "overload"636version = "0.1.1"637source = "registry+https://github.com/rust-lang/crates.io-index"638checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"639640[[package]]641name = "proc-macro-error"642version = "1.0.4"643source = "registry+https://github.com/rust-lang/crates.io-index"644checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
459 unmodified lines
modified:Cargo.toml+6 added-2 removed