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
Provenance
- Commit
d441516- Tree
fcdd55d- Author
Thayne McCombs <astrothayne@gmail.com>- Committer
Thayne McCombs <astrothayne@gmail.com>- Parent
2aa966c
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"272 unmodified lines300 [[package]]301 name = "fd-find"302 version = "8.5.3"303 dependencies = [313- "ansi_term",304 "anyhow",305 "argmax",306 "atty",307 "chrono",12 unmodified lines320 "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 lines522 ]523 524 [[package]]525 name = "lscolors"535-version = "0.12.0"526+version = "0.13.0"527 source = "registry+https://github.com/rust-lang/crates.io-index"537-checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1"528+checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2"529 dependencies = [539- "ansi_term",530+ "nu-ansi-term",531 ]532 533 [[package]]534 name = "memchr"33 unmodified lines568 "winapi",569 ]570 571 [[package]]572+name = "nu-ansi-term"573+version = "0.46.0"574+source = "registry+https://github.com/rust-lang/crates.io-index"575+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"576+dependencies = [577+ "overload",578+ "winapi",579+]580+581+[[package]]582 name = "num-integer"583 version = "0.1.45"584 source = "registry+https://github.com/rust-lang/crates.io-index"585 checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"33 unmodified lines619 source = "registry+https://github.com/rust-lang/crates.io-index"620 checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"621 622 [[package]]623+name = "overload"624+version = "0.1.1"625+source = "registry+https://github.com/rust-lang/crates.io-index"626+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"627+628+[[package]]629 name = "proc-macro-error"630 version = "1.0.4"631 source = "registry+https://github.com/rust-lang/crates.io-index"632 checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"492 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.6.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