Merge pull request #4168 from sylvestre/lscolors

update lscolors to switch to nu_ansi_term
This commit is contained in:
Sylvestre Ledru 2022-11-20 20:35:21 +01:00 committed by GitHub
commit 9e859e98c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 14 deletions

31
Cargo.lock generated
View file

@ -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"

View file

@ -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" },

View file

@ -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"

View file

@ -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,
}