From edc08f59fb8aebd1f1b78a101373bad8bd72d3f4 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 20 Nov 2022 13:20:42 +0100 Subject: [PATCH 1/2] update lscolors to switch to nu_ansi_term --- Cargo.lock | 31 +++++++++++++++++++------------ src/uu/ls/Cargo.toml | 2 +- src/uu/ls/src/ls.rs | 2 +- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 89afe4aa3..e7f1445b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,15 +49,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "arrayref" version = "0.3.6" @@ -1250,11 +1241,11 @@ dependencies = [ [[package]] name = "lscolors" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1" +checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2" dependencies = [ - "ansi_term", + "nu-ansi-term", ] [[package]] @@ -1365,6 +1356,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.3" @@ -1505,6 +1506,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parking_lot" version = "0.12.1" diff --git a/src/uu/ls/Cargo.toml b/src/uu/ls/Cargo.toml index cdaac6e61..5941b72a8 100644 --- a/src/uu/ls/Cargo.toml +++ b/src/uu/ls/Cargo.toml @@ -22,7 +22,7 @@ number_prefix = "0.4" term_grid = "0.1.5" terminal_size = "0.2.2" glob = "0.3.0" -lscolors = { version = "0.12.0", features = ["ansi_term"] } +lscolors = { version = "0.13.0", default-features=false, features = ["nu-ansi-term"] } uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features = ["entries", "fs"] } once_cell = "1.13.1" atty = "0.2" diff --git a/src/uu/ls/src/ls.rs b/src/uu/ls/src/ls.rs index 7d13bae49..a47a700b6 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -2888,7 +2888,7 @@ fn display_file_name( fn color_name(name: String, path: &Path, md: Option<&Metadata>, ls_colors: &LsColors) -> String { match ls_colors.style_for_path_with_metadata(path, md) { Some(style) => { - return style.to_ansi_term_style().paint(name).to_string(); + return style.to_nu_ansi_term_style().paint(name).to_string(); } None => name, } From 406f5978a05931b88e50d09e3b0ee7d1efa386a2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 20 Nov 2022 16:51:10 +0100 Subject: [PATCH 2/2] ignore bindgen 0.60.1 --- deny.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deny.toml b/deny.toml index 8e5304ff2..e0f3c4012 100644 --- a/deny.toml +++ b/deny.toml @@ -74,6 +74,9 @@ skip = [ { name = "clap", version = "=3.2.22" }, # bindgen (via selinux-sys & fts-sys) { name = "clap_lex", version = "=0.2.4" }, + # fts-sys. See: + # https://github.com/uutils/coreutils/pull/4168#issuecomment-1321164839 + { name = "bindgen", version = "=0.60.1" }, # windows-sys (via terminal_size, crossterm -> parking_lot, notify -> filetime) { name = "windows-sys", version = "=0.36.1" }, { name = "windows_aarch64_msvc", version = "=0.36.1" },