mirror of https://github.com/sharkdp/fd.git
Use nu-ansi-term instead of ansi-term
Because ansi-term is no longer maintained. Relates-To: #1188
This commit is contained in:
parent
2aa966cb3c
commit
d441516c9d
|
@ -20,15 +20,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ansi_term"
|
|
||||||
version = "0.12.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
|
||||||
dependencies = [
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.66"
|
version = "1.0.66"
|
||||||
|
@ -310,7 +301,6 @@ dependencies = [
|
||||||
name = "fd-find"
|
name = "fd-find"
|
||||||
version = "8.5.3"
|
version = "8.5.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"argmax",
|
"argmax",
|
||||||
"atty",
|
"atty",
|
||||||
|
@ -331,6 +321,7 @@ dependencies = [
|
||||||
"lscolors",
|
"lscolors",
|
||||||
"nix 0.24.2",
|
"nix 0.24.2",
|
||||||
"normpath",
|
"normpath",
|
||||||
|
"nu-ansi-term",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"regex",
|
"regex",
|
||||||
|
@ -532,11 +523,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lscolors"
|
name = "lscolors"
|
||||||
version = "0.12.0"
|
version = "0.13.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1"
|
checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"nu-ansi-term",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -577,6 +568,16 @@ dependencies = [
|
||||||
"winapi",
|
"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]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "num-integer"
|
||||||
version = "0.1.45"
|
version = "0.1.45"
|
||||||
|
@ -618,6 +619,12 @@ version = "6.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
|
checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "overload"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro-error"
|
name = "proc-macro-error"
|
||||||
version = "1.0.4"
|
version = "1.0.4"
|
||||||
|
|
|
@ -33,7 +33,7 @@ path = "src/main.rs"
|
||||||
version_check = "0.9"
|
version_check = "0.9"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ansi_term = "0.12"
|
nu-ansi-term = "0.46"
|
||||||
argmax = "0.3.1"
|
argmax = "0.3.1"
|
||||||
atty = "0.2"
|
atty = "0.2"
|
||||||
ignore = "0.4.3"
|
ignore = "0.4.3"
|
||||||
|
@ -42,7 +42,6 @@ regex = "1.6.0"
|
||||||
regex-syntax = "0.6"
|
regex-syntax = "0.6"
|
||||||
ctrlc = "3.2"
|
ctrlc = "3.2"
|
||||||
humantime = "2.1"
|
humantime = "2.1"
|
||||||
lscolors = "0.12"
|
|
||||||
globset = "0.4"
|
globset = "0.4"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
dirs-next = "2.0"
|
dirs-next = "2.0"
|
||||||
|
@ -57,6 +56,11 @@ faccess = "0.2.4"
|
||||||
version = "4.0.22"
|
version = "4.0.22"
|
||||||
features = ["suggestions", "color", "wrap_help", "cargo", "unstable-grouped", "derive"]
|
features = ["suggestions", "color", "wrap_help", "cargo", "unstable-grouped", "derive"]
|
||||||
|
|
||||||
|
[dependencies.lscolors]
|
||||||
|
version = "0.13"
|
||||||
|
default-features = false
|
||||||
|
features = ["nu-ansi-term"]
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
users = "0.11.0"
|
users = "0.11.0"
|
||||||
nix = { version = "0.24.2", default-features = false, features = ["signal"] }
|
nix = { version = "0.24.2", default-features = false, features = ["signal"] }
|
||||||
|
|
|
@ -212,7 +212,7 @@ fn construct_config(mut opts: Opts, pattern_regexps: &[String]) -> Result<Config
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let ansi_colors_support =
|
let ansi_colors_support =
|
||||||
ansi_term::enable_ansi_support().is_ok() || std::env::var_os("TERM").is_some();
|
nu_ansi_term::enable_ansi_support().is_ok() || std::env::var_os("TERM").is_some();
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
let ansi_colors_support = true;
|
let ansi_colors_support = true;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ fn print_trailing_slash<W: Write>(
|
||||||
stdout,
|
stdout,
|
||||||
"{}",
|
"{}",
|
||||||
style
|
style
|
||||||
.map(Style::to_ansi_term_style)
|
.map(Style::to_nu_ansi_term_style)
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.paint(&config.actual_path_separator)
|
.paint(&config.actual_path_separator)
|
||||||
)?;
|
)?;
|
||||||
|
@ -85,14 +85,14 @@ fn print_entry_colorized<W: Write>(
|
||||||
|
|
||||||
let style = ls_colors
|
let style = ls_colors
|
||||||
.style_for_indicator(Indicator::Directory)
|
.style_for_indicator(Indicator::Directory)
|
||||||
.map(Style::to_ansi_term_style)
|
.map(Style::to_nu_ansi_term_style)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
write!(stdout, "{}", style.paint(parent_str))?;
|
write!(stdout, "{}", style.paint(parent_str))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let style = entry
|
let style = entry
|
||||||
.style(ls_colors)
|
.style(ls_colors)
|
||||||
.map(Style::to_ansi_term_style)
|
.map(Style::to_nu_ansi_term_style)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
write!(stdout, "{}", style.paint(&path_str[offset..]))?;
|
write!(stdout, "{}", style.paint(&path_str[offset..]))?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue