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
Provenance
- Commit
6e3eb26- Tree
e24ac97- Author
Tavian Barnes <tavianator@tavianator.com>- Committer
GitHub <noreply@github.com>- Parent 1
4a66d8f- Parent 2
d441516
4 files changed+30 added−19 removed
modified:src/main.rs+1 added-1 removed
210 unmodified lines211 let owner_constraint: Option<OwnerFilter> = opts.owner.and_then(OwnerFilter::filter_ignore);212 213 #[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;218 219 let interactive_terminal = atty::is(Stream::Stdout);248 unmodified linesmodified:src/output.rs+3 added-3 removed
44 unmodified lines45 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 lines84 }85 86 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 }92 93 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..]))?;98 99 print_trailing_slash(61 unmodified linesmodified:Cargo.lock+20 added-13 removed
19 unmodified lines20 "libc",21 ]22 23 [[package]]24-name = "ansi_term"25-version = "0.12.1"26-source = "registry+https://github.com/rust-lang/crates.io-index"27-checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"28-dependencies = [29- "winapi",30-]31-32-[[package]]24 name = "anyhow"25 version = "1.0.66"26 source = "registry+https://github.com/rust-lang/crates.io-index"27 checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6"281 unmodified lines309 [[package]]310 name = "fd-find"311 version = "8.5.3"312 dependencies = [322- "ansi_term",313 "anyhow",314 "argmax",315 "atty",316 "chrono",12 unmodified lines329 "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 lines534 ]535 536 [[package]]537 name = "lscolors"547-version = "0.12.0"538+version = "0.13.0"539 source = "registry+https://github.com/rust-lang/crates.io-index"549-checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1"540+checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2"541 dependencies = [551- "ansi_term",542+ "nu-ansi-term",543 ]544 545 [[package]]546 name = "memchr"33 unmodified lines580 "winapi",581 ]582 583 [[package]]584+name = "nu-ansi-term"585+version = "0.46.0"586+source = "registry+https://github.com/rust-lang/crates.io-index"587+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"588+dependencies = [589+ "overload",590+ "winapi",591+]592+593+[[package]]594 name = "num-integer"595 version = "0.1.45"596 source = "registry+https://github.com/rust-lang/crates.io-index"597 checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"33 unmodified lines631 source = "registry+https://github.com/rust-lang/crates.io-index"632 checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"633 634 [[package]]635+name = "overload"636+version = "0.1.1"637+source = "registry+https://github.com/rust-lang/crates.io-index"638+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"639+640+[[package]]641 name = "proc-macro-error"642 version = "1.0.4"643 source = "registry+https://github.com/rust-lang/crates.io-index"644 checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"459 unmodified linesmodified:Cargo.toml+6 added-2 removed
31 unmodified lines323334353636373839404142434445454647486 unmodified lines5556575859606162636465666724 unmodified lines31 unmodified lines[build-dependencies]version_check = "0.9"
[dependencies]ansi_term = "0.12"nu-ansi-term = "0.46"argmax = "0.3.1"atty = "0.2"ignore = "0.4.3"num_cpus = "1.13"regex = "1.7.0"regex-syntax = "0.6"ctrlc = "3.2"humantime = "2.1"lscolors = "0.12"globset = "0.4"anyhow = "1.0"dirs-next = "2.0"normpath = "0.3.2"6 unmodified lines[dependencies.clap]version = "4.0.22"features = ["suggestions", "color", "wrap_help", "cargo", "unstable-grouped", "derive"]
[dependencies.lscolors]version = "0.13"default-features = falsefeatures = ["nu-ansi-term"]
[target.'cfg(unix)'.dependencies]users = "0.11.0"nix = { version = "0.24.2", default-features = false, features = ["signal"] }
24 unmodified lines