mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge branch 'main' into fs_extra
This commit is contained in:
commit
b1392195f6
140 changed files with 559 additions and 562 deletions
|
@ -1 +1 @@
|
||||||
msrv = "1.60.0"
|
msrv = "1.64.0"
|
||||||
|
|
2
.github/workflows/CICD.yml
vendored
2
.github/workflows/CICD.yml
vendored
|
@ -11,7 +11,7 @@ env:
|
||||||
PROJECT_NAME: coreutils
|
PROJECT_NAME: coreutils
|
||||||
PROJECT_DESC: "Core universal (cross-platform) utilities"
|
PROJECT_DESC: "Core universal (cross-platform) utilities"
|
||||||
PROJECT_AUTH: "uutils"
|
PROJECT_AUTH: "uutils"
|
||||||
RUST_MIN_SRV: "1.60.0" ## MSRV v1.60.0
|
RUST_MIN_SRV: "1.64.0"
|
||||||
# * style job configuration
|
# * style job configuration
|
||||||
STYLE_FAIL_ON_FAULT: true ## (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis
|
STYLE_FAIL_ON_FAULT: true ## (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis
|
||||||
|
|
||||||
|
|
99
Cargo.lock
generated
99
Cargo.lock
generated
|
@ -128,13 +128,13 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blake2b_simd"
|
name = "blake2b_simd"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127"
|
checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayref",
|
"arrayref",
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"constant_time_eq 0.1.5",
|
"constant_time_eq",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -147,7 +147,7 @@ dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"cc",
|
"cc",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"constant_time_eq 0.2.4",
|
"constant_time_eq",
|
||||||
"digest",
|
"digest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"strsim",
|
"strsim",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
"terminal_size 0.2.2",
|
"terminal_size",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -285,24 +285,17 @@ checksum = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "console"
|
name = "console"
|
||||||
version = "0.15.2"
|
version = "0.15.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c"
|
checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encode_unicode",
|
"encode_unicode",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"terminal_size 0.1.17",
|
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
"winapi",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "constant_time_eq"
|
|
||||||
version = "0.1.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "constant_time_eq"
|
name = "constant_time_eq"
|
||||||
version = "0.2.4"
|
version = "0.2.4"
|
||||||
|
@ -571,7 +564,7 @@ dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
"memoffset 0.7.1",
|
"memoffset",
|
||||||
"scopeguard",
|
"scopeguard",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -637,12 +630,12 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ctrlc"
|
name = "ctrlc"
|
||||||
version = "3.2.3"
|
version = "3.2.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173"
|
checksum = "1631ca6e3c59112501a9d87fd86f21591ff77acd31331e8a73f8d80a65bbdd71"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nix",
|
"nix",
|
||||||
"winapi",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1095,9 +1088,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indicatif"
|
name = "indicatif"
|
||||||
version = "0.17.2"
|
version = "0.17.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19"
|
checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"console",
|
"console",
|
||||||
"number_prefix",
|
"number_prefix",
|
||||||
|
@ -1207,9 +1200,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.137"
|
version = "0.2.139"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
|
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libloading"
|
name = "libloading"
|
||||||
|
@ -1294,15 +1287,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memoffset"
|
|
||||||
version = "0.6.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
|
@ -1341,16 +1325,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.25.0"
|
version = "0.26.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"
|
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"memoffset 0.6.5",
|
"static_assertions",
|
||||||
"pin-utils",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1843,25 +1825,6 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "remove_dir_all"
|
|
||||||
version = "0.7.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "882f368737489ea543bc5c340e6f3d34a28c39980bd9a979e47322b26f60ac40"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"log",
|
|
||||||
"num_cpus",
|
|
||||||
"rayon",
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "retain_mut"
|
|
||||||
version = "0.1.7"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8c31b5c4033f8fdde8700e4657be2c497e7288f01515be52168c631e2e4d4086"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rlimit"
|
name = "rlimit"
|
||||||
version = "0.8.3"
|
version = "0.8.3"
|
||||||
|
@ -2106,6 +2069,12 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "static_assertions"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "strsim"
|
name = "strsim"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
|
@ -2158,7 +2127,7 @@ dependencies = [
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"libc",
|
"libc",
|
||||||
"redox_syscall",
|
"redox_syscall",
|
||||||
"remove_dir_all 0.5.3",
|
"remove_dir_all",
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -2180,16 +2149,6 @@ dependencies = [
|
||||||
"winapi-util",
|
"winapi-util",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "terminal_size"
|
|
||||||
version = "0.1.17"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "terminal_size"
|
name = "terminal_size"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
|
@ -2207,7 +2166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
|
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"smawk",
|
"smawk",
|
||||||
"terminal_size 0.2.2",
|
"terminal_size",
|
||||||
"unicode-linebreak",
|
"unicode-linebreak",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
]
|
]
|
||||||
|
@ -2749,7 +2708,7 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"selinux",
|
"selinux",
|
||||||
"term_grid",
|
"term_grid",
|
||||||
"terminal_size 0.2.2",
|
"terminal_size",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
"uucore",
|
"uucore",
|
||||||
]
|
]
|
||||||
|
@ -2970,7 +2929,6 @@ version = "0.0.17"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"libc",
|
"libc",
|
||||||
"remove_dir_all 0.7.0",
|
|
||||||
"uucore",
|
"uucore",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
|
@ -3152,7 +3110,6 @@ version = "0.0.17"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"libc",
|
"libc",
|
||||||
"retain_mut",
|
|
||||||
"uucore",
|
"uucore",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
113
Cargo.toml
113
Cargo.toml
|
@ -1,7 +1,7 @@
|
||||||
# coreutils (uutils)
|
# coreutils (uutils)
|
||||||
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
|
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
|
||||||
|
|
||||||
# spell-checker:ignore (libs) libselinux gethostid procfs
|
# spell-checker:ignore (libs) libselinux gethostid procfs bigdecimal kqueue
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "coreutils"
|
name = "coreutils"
|
||||||
|
@ -16,7 +16,7 @@ repository = "https://github.com/uutils/coreutils"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
|
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
|
||||||
categories = ["command-line-utilities"]
|
categories = ["command-line-utilities"]
|
||||||
rust-version = "1.60.0"
|
rust-version = "1.64.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
@ -262,17 +262,90 @@ feat_os_windows_legacy = [
|
||||||
# * bypass/override ~ translate 'test' feature name to avoid dependency collision with rust core 'test' crate (o/w surfaces as compiler errors during testing)
|
# * bypass/override ~ translate 'test' feature name to avoid dependency collision with rust core 'test' crate (o/w surfaces as compiler errors during testing)
|
||||||
test = [ "uu_test" ]
|
test = [ "uu_test" ]
|
||||||
|
|
||||||
[workspace]
|
[workspace.dependencies]
|
||||||
|
atty = "0.2"
|
||||||
[dependencies]
|
bigdecimal = "0.3"
|
||||||
|
binary-heap-plus = "0.5.0"
|
||||||
|
bstr = "1.0"
|
||||||
|
bytecount = "0.6.3"
|
||||||
|
byteorder = "1.3.2"
|
||||||
|
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||||
clap_complete = "4.0"
|
clap_complete = "4.0"
|
||||||
|
compare = "0.1.0"
|
||||||
|
coz = { version = "0.1.3" }
|
||||||
|
crossterm = ">=0.19"
|
||||||
|
ctrlc = { version = "3.0", features = ["termination"] }
|
||||||
|
exacl = "0.9.0"
|
||||||
|
file_diff = "1.0.0"
|
||||||
|
filetime = "0.2"
|
||||||
|
fnv = "1.0.7"
|
||||||
|
fs_extra = "1.1.0"
|
||||||
|
fts-sys = "0.2"
|
||||||
|
gcd = "2.2"
|
||||||
|
glob = "0.3.0"
|
||||||
|
half = "2.1"
|
||||||
|
indicatif = "0.17"
|
||||||
|
itertools = "0.10.0"
|
||||||
|
libc = "0.2.139"
|
||||||
|
lscolors = { version = "0.13.0", default-features=false, features = ["nu-ansi-term"] }
|
||||||
|
memchr = "2"
|
||||||
|
nix = { version="0.26", default-features=false }
|
||||||
|
nom = "7.1.1"
|
||||||
|
notify = { version = "=5.0.0", features=["macos_kqueue"]}
|
||||||
|
num_cpus = "1.14"
|
||||||
|
num-bigint = "0.4.0"
|
||||||
|
num-traits = "0.2.15"
|
||||||
|
number_prefix = "0.4"
|
||||||
once_cell = "1.13.1"
|
once_cell = "1.13.1"
|
||||||
|
onig = { version = "~6.4", default-features = false }
|
||||||
|
ouroboros = "0.15.5"
|
||||||
phf = "0.11.1"
|
phf = "0.11.1"
|
||||||
selinux = { version="0.3", optional = true }
|
phf_codegen = "0.11.1"
|
||||||
|
platform-info = "1.0.2"
|
||||||
|
quick-error = "2.0.1"
|
||||||
|
rand = { version = "0.8", features = ["small_rng"] }
|
||||||
|
rand_core = "0.6"
|
||||||
|
rayon = "1.5"
|
||||||
|
redox_syscall = "0.2"
|
||||||
|
regex = "1.7.1"
|
||||||
|
rust-ini = "0.18.0"
|
||||||
|
same-file = "1.0.6"
|
||||||
|
selinux = "0.3"
|
||||||
|
signal-hook = "0.3.14"
|
||||||
|
smallvec = { version = "1.10", features = ["union"] }
|
||||||
|
strum = "0.24.1"
|
||||||
|
strum_macros = "0.24.2"
|
||||||
|
tempfile = "3.3.0"
|
||||||
|
term_grid = "0.1.5"
|
||||||
|
terminal_size = "0.2.2"
|
||||||
textwrap = { version="0.16.0", features=["terminal_size"] }
|
textwrap = { version="0.16.0", features=["terminal_size"] }
|
||||||
|
thiserror = "1.0"
|
||||||
|
time = { version="0.3" }
|
||||||
|
unicode-segmentation = "1.9.0"
|
||||||
|
unicode-width = "0.1.8"
|
||||||
|
utf-8 = "0.7.6"
|
||||||
|
walkdir = "2.2"
|
||||||
|
winapi-util = "0.1.5"
|
||||||
|
windows-sys = { version="0.42.0", default-features=false }
|
||||||
|
xattr = "0.2.3"
|
||||||
|
zip = { version = "0.6.3", default_features=false, features=["deflate"] }
|
||||||
|
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="src/uucore" }
|
uucore = { version=">=0.0.17", package="uucore", path="src/uucore" }
|
||||||
zip = { version = "0.6.3", optional=true, default_features=false, features=["deflate"] }
|
uucore_procs = { version=">=0.0.17", package="uucore_procs", path="src/uucore_procs" }
|
||||||
|
uu_ls = { version=">=0.0.17", path="src/uu/ls" }
|
||||||
|
uu_base32 = { version=">=0.0.17", path="src/uu/base32"}
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
clap = { workspace=true }
|
||||||
|
once_cell = { workspace=true }
|
||||||
|
uucore = { workspace=true }
|
||||||
|
clap_complete = { workspace=true }
|
||||||
|
phf = { workspace=true }
|
||||||
|
selinux = { workspace=true, optional = true }
|
||||||
|
textwrap = { workspace=true }
|
||||||
|
zip = { workspace=true, optional = true }
|
||||||
|
|
||||||
# * uutils
|
# * uutils
|
||||||
uu_test = { optional=true, version="0.0.17", package="uu_test", path="src/uu/test" }
|
uu_test = { optional=true, version="0.0.17", package="uu_test", path="src/uu/test" }
|
||||||
#
|
#
|
||||||
|
@ -388,21 +461,21 @@ yes = { optional=true, version="0.0.17", package="uu_yes", path="src/uu/yes
|
||||||
#pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`)
|
#pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`)
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { workspace=true }
|
||||||
conv = "0.3"
|
conv = "0.3"
|
||||||
filetime = "0.2"
|
filetime = { workspace=true }
|
||||||
glob = "0.3.0"
|
glob = { workspace=true }
|
||||||
libc = "0.2"
|
libc = { workspace=true }
|
||||||
pretty_assertions = "1"
|
pretty_assertions = "1"
|
||||||
rand = "0.8"
|
rand = { workspace=true }
|
||||||
regex = "1.7"
|
regex = { workspace=true }
|
||||||
sha1 = { version="0.10", features=["std"] }
|
sha1 = { version="0.10", features=["std"] }
|
||||||
tempfile = "3"
|
tempfile = { workspace=true }
|
||||||
time = {version="0.3", features=["local-offset"]}
|
time = { workspace=true, features=["local-offset"] }
|
||||||
unindent = "0.1"
|
unindent = "0.1"
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="src/uucore", features=["entries", "process", "signals"] }
|
uucore = { workspace=true, features=["entries", "process", "signals"] }
|
||||||
walkdir = "2.2"
|
walkdir = { workspace=true }
|
||||||
atty = "0.2"
|
atty = { workspace=true }
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
rstest = "0.16.0"
|
rstest = "0.16.0"
|
||||||
|
|
||||||
|
@ -411,12 +484,12 @@ procfs = { version = "0.14", default-features = false }
|
||||||
rlimit = "0.8.3"
|
rlimit = "0.8.3"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dev-dependencies]
|
[target.'cfg(unix)'.dev-dependencies]
|
||||||
nix = { version = "0.25", default-features = false, features = ["process", "signal", "user"] }
|
nix = { workspace=true, features=["process", "signal", "user"] }
|
||||||
rust-users = { version="0.11", package="users" }
|
rust-users = { version="0.11", package="users" }
|
||||||
rand_pcg = "0.3"
|
rand_pcg = "0.3"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
phf_codegen = "0.11.1"
|
phf_codegen = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "coreutils"
|
name = "coreutils"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
[](https://deps.rs/repo/github/uutils/coreutils)
|
[](https://deps.rs/repo/github/uutils/coreutils)
|
||||||
|
|
||||||
[](https://codecov.io/gh/uutils/coreutils)
|
[](https://codecov.io/gh/uutils/coreutils)
|
||||||

|

|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ Both can also be generated locally, the instructions for that can be found in th
|
||||||
### Rust Version
|
### Rust Version
|
||||||
|
|
||||||
uutils follows Rust's release channels and is tested against stable, beta and nightly.
|
uutils follows Rust's release channels and is tested against stable, beta and nightly.
|
||||||
The current Minimum Supported Rust Version (MSRV) is `1.60.0`.
|
The current Minimum Supported Rust Version (MSRV) is `1.64.0`.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
|
15
deny.toml
15
deny.toml
|
@ -58,20 +58,7 @@ highlight = "all"
|
||||||
# For each duplicate dependency, indicate the name of the dependency which
|
# For each duplicate dependency, indicate the name of the dependency which
|
||||||
# introduces it.
|
# introduces it.
|
||||||
# spell-checker: disable
|
# spell-checker: disable
|
||||||
skip = [
|
skip = []
|
||||||
# blake2d_simd
|
|
||||||
{ name = "arrayvec", version = "=0.7.2" },
|
|
||||||
# quickcheck
|
|
||||||
{ name = "env_logger", version = "=0.8.4" },
|
|
||||||
# tempfile
|
|
||||||
{ name = "remove_dir_all", version = "=0.5.3" },
|
|
||||||
# console (via indicatif)
|
|
||||||
{ name = "terminal_size", version = "=0.1.17" },
|
|
||||||
# nix
|
|
||||||
{ name = "memoffset", version = "=0.6.5"},
|
|
||||||
# blake2b_simd
|
|
||||||
{ name = "constant_time_eq", version = "=0.1.5"},
|
|
||||||
]
|
|
||||||
# spell-checker: enable
|
# spell-checker: enable
|
||||||
|
|
||||||
# This section is considered when running `cargo deny check sources`.
|
# This section is considered when running `cargo deny check sources`.
|
||||||
|
|
|
@ -5,6 +5,11 @@ features that are not supported by GNU coreutils. We take care not to introduce
|
||||||
features that are incompatible with the GNU coreutils. Below is a list of uutils
|
features that are incompatible with the GNU coreutils. Below is a list of uutils
|
||||||
extensions.
|
extensions.
|
||||||
|
|
||||||
|
## `env`
|
||||||
|
|
||||||
|
`env` has an additional `-f`/`--file` flag that can parse `.env` files and set
|
||||||
|
variables accordingly. This feature is adopted from `dotenv` style packages.
|
||||||
|
|
||||||
## `cp`
|
## `cp`
|
||||||
|
|
||||||
`cp` can display a progress bar when the `-g`/`--progress` flag is set.
|
`cp` can display a progress bar when the `-g`/`--progress` flag is set.
|
||||||
|
@ -36,4 +41,5 @@ therefore welcomed.
|
||||||
|
|
||||||
## `cut`
|
## `cut`
|
||||||
|
|
||||||
`cut` can separate fields by whitespace (Space and Tab) with `-w` flag. This feature is adopted from [FreeBSD](https://www.freebsd.org/cgi/man.cgi?cut).
|
`cut` can separate fields by whitespace (Space and Tab) with `-w` flag. This
|
||||||
|
feature is adopted from [FreeBSD](https://www.freebsd.org/cgi/man.cgi?cut).
|
||||||
|
|
|
@ -347,7 +347,7 @@ impl<'a, 'b> MDWriter<'a, 'b> {
|
||||||
.trim()
|
.trim()
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
if result != "" {
|
if !result.is_empty() {
|
||||||
Some(result)
|
Some(result)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/arch.rs"
|
path = "src/arch.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
platform-info = "1.0.2"
|
platform-info = { workspace=true }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "arch"
|
name = "arch"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/base32.rs"
|
path = "src/base32.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] }
|
uucore = { workspace=true, features = ["encoding"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "base32"
|
name = "base32"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/base64.rs"
|
path = "src/base64.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] }
|
uucore = { workspace=true, features = ["encoding"] }
|
||||||
uu_base32 = { version=">=0.0.17", package="uu_base32", path="../base32"}
|
uu_base32 = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/basename.rs"
|
path = "src/basename.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "basename"
|
name = "basename"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/basenc.rs"
|
path = "src/basenc.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] }
|
uucore = { workspace=true, features = ["encoding"] }
|
||||||
uu_base32 = { version=">=0.0.17", package="uu_base32", path="../base32"}
|
uu_base32 = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "basenc"
|
name = "basenc"
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::io::{stdin, Read};
|
||||||
use uucore::error::UClapError;
|
use uucore::error::UClapError;
|
||||||
|
|
||||||
static ABOUT: &str = "\
|
static ABOUT: &str = "\
|
||||||
encode/decode data and print to standard output
|
Encode/decode data and print to standard output
|
||||||
With no FILE, or when FILE is -, read standard input.
|
With no FILE, or when FILE is -, read standard input.
|
||||||
|
|
||||||
When decoding, the input may contain newlines in addition to the bytes of
|
When decoding, the input may contain newlines in addition to the bytes of
|
||||||
|
|
|
@ -15,13 +15,13 @@ edition = "2021"
|
||||||
path = "src/cat.rs"
|
path = "src/cat.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
thiserror = "1.0"
|
thiserror = { workspace = true }
|
||||||
atty = "0.2"
|
atty = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "pipes"] }
|
uucore = { workspace=true, features=["fs", "pipes"] }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
nix = { version = "0.25", default-features = false }
|
nix = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cat"
|
name = "cat"
|
||||||
|
|
|
@ -14,12 +14,12 @@ edition = "2021"
|
||||||
path = "src/chcon.rs"
|
path = "src/chcon.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version = ">=0.0.9", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||||
selinux = { version = "0.3" }
|
selinux = { workspace=true }
|
||||||
fts-sys = { version = "0.2" }
|
thiserror = { workspace = true }
|
||||||
thiserror = { version = "1.0" }
|
libc = { workspace=true }
|
||||||
libc = { version = "0.2" }
|
fts-sys = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chcon"
|
name = "chcon"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/chgrp.rs"
|
path = "src/chgrp.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chgrp"
|
name = "chgrp"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/chmod.rs"
|
path = "src/chmod.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode"] }
|
uucore = { workspace=true, features=["fs", "mode"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chmod"
|
name = "chmod"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/chown.rs"
|
path = "src/chown.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chown"
|
name = "chown"
|
||||||
|
|
|
@ -19,7 +19,7 @@ use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::os::unix::fs::MetadataExt;
|
use std::os::unix::fs::MetadataExt;
|
||||||
|
|
||||||
static ABOUT: &str = "change file owner and group";
|
static ABOUT: &str = "Change file owner and group";
|
||||||
|
|
||||||
const USAGE: &str = "\
|
const USAGE: &str = "\
|
||||||
{} [OPTION]... [OWNER][:[GROUP]] FILE...
|
{} [OPTION]... [OWNER][:[GROUP]] FILE...
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/chroot.rs"
|
path = "src/chroot.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] }
|
uucore = { workspace=true, features=["entries", "fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chroot"
|
name = "chroot"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/cksum.rs"
|
path = "src/cksum.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cksum"
|
name = "cksum"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/comm.rs"
|
path = "src/comm.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "comm"
|
name = "comm"
|
||||||
|
|
|
@ -17,7 +17,7 @@ use uucore::format_usage;
|
||||||
|
|
||||||
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
||||||
|
|
||||||
static ABOUT: &str = "compare two sorted files line by line";
|
static ABOUT: &str = "Compare two sorted files line by line";
|
||||||
static LONG_HELP: &str = "";
|
static LONG_HELP: &str = "";
|
||||||
const USAGE: &str = "{} [OPTION]... FILE1 FILE2";
|
const USAGE: &str = "{} [OPTION]... FILE1 FILE2";
|
||||||
|
|
||||||
|
|
|
@ -19,18 +19,18 @@ edition = "2021"
|
||||||
path = "src/cp.rs"
|
path = "src/cp.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
filetime = "0.2"
|
filetime = { workspace=true }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
quick-error = "2.0.1"
|
quick-error = { workspace=true }
|
||||||
selinux = { version="0.3", optional=true }
|
selinux = { workspace=true, optional=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms", "mode"] }
|
uucore = { workspace=true, features=["entries", "fs", "perms", "mode"] }
|
||||||
walkdir = "2.2"
|
walkdir = { workspace=true }
|
||||||
indicatif = "0.17"
|
indicatif = { workspace=true }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
xattr="0.2.3"
|
xattr = { workspace=true }
|
||||||
exacl= { version = "0.9.0", optional=true }
|
exacl = { workspace=true, optional=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cp"
|
name = "cp"
|
||||||
|
|
|
@ -523,7 +523,7 @@ pub fn uu_app() -> Command {
|
||||||
.long(options::SPARSE)
|
.long(options::SPARSE)
|
||||||
.value_name("WHEN")
|
.value_name("WHEN")
|
||||||
.value_parser(["never", "auto", "always"])
|
.value_parser(["never", "auto", "always"])
|
||||||
.help("NotImplemented: control creation of sparse files. See below"),
|
.help("control creation of sparse files. See below"),
|
||||||
)
|
)
|
||||||
// TODO: implement the following args
|
// TODO: implement the following args
|
||||||
.arg(
|
.arg(
|
||||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
||||||
path = "src/csplit.rs"
|
path = "src/csplit.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
thiserror = "1.0"
|
thiserror = { workspace = true }
|
||||||
regex = "1.7.1"
|
regex = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] }
|
uucore = { workspace=true, features=["entries", "fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "csplit"
|
name = "csplit"
|
||||||
|
|
|
@ -22,7 +22,7 @@ mod split_name;
|
||||||
use crate::csplit_error::CsplitError;
|
use crate::csplit_error::CsplitError;
|
||||||
use crate::split_name::SplitName;
|
use crate::split_name::SplitName;
|
||||||
|
|
||||||
static ABOUT: &str = "split a file into sections determined by context lines";
|
static ABOUT: &str = "Split a file into sections determined by context lines";
|
||||||
static LONG_HELP: &str = "Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ..., and output byte counts of each piece to standard output.";
|
static LONG_HELP: &str = "Output pieces of FILE separated by PATTERN(s) to files 'xx00', 'xx01', ..., and output byte counts of each piece to standard output.";
|
||||||
const USAGE: &str = "{} [OPTION]... FILE PATTERN...";
|
const USAGE: &str = "{} [OPTION]... FILE PATTERN...";
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,11 @@ edition = "2021"
|
||||||
path = "src/cut.rs"
|
path = "src/cut.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
memchr = "2"
|
memchr = { workspace=true }
|
||||||
bstr = "1.0"
|
bstr = { workspace=true }
|
||||||
atty = "0.2"
|
atty = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cut"
|
name = "cut"
|
||||||
|
|
|
@ -15,15 +15,15 @@ edition = "2021"
|
||||||
path = "src/date.rs"
|
path = "src/date.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { workspace=true }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
libc = "0.2"
|
libc = { workspace=true }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Foundation", "Win32_System_SystemInformation"] }
|
windows-sys = { workspace=true, features = ["Win32_Foundation", "Win32_System_SystemInformation"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "date"
|
name = "date"
|
||||||
|
|
|
@ -36,7 +36,7 @@ const MINUTE: &str = "minute";
|
||||||
const SECOND: &str = "second";
|
const SECOND: &str = "second";
|
||||||
const NS: &str = "ns";
|
const NS: &str = "ns";
|
||||||
|
|
||||||
const ABOUT: &str = "print or set the system date and time";
|
const ABOUT: &str = "Print or set the system date and time";
|
||||||
const USAGE: &str = "\
|
const USAGE: &str = "\
|
||||||
{} [OPTION]... [+FORMAT]...
|
{} [OPTION]... [+FORMAT]...
|
||||||
{} [OPTION]... [MMDDhhmm[[CC]YY][.ss]]";
|
{} [OPTION]... [MMDDhhmm[[CC]YY][.ss]]";
|
||||||
|
|
|
@ -15,13 +15,13 @@ edition = "2021"
|
||||||
path = "src/dd.rs"
|
path = "src/dd.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
gcd = "2.2"
|
gcd = { workspace=true }
|
||||||
libc = "0.2"
|
libc = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
||||||
signal-hook = "0.3.14"
|
signal-hook = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "dd"
|
name = "dd"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/df.rs"
|
path = "src/df.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["libc", "fsext"] }
|
uucore = { workspace=true, features=["libc", "fsext"] }
|
||||||
unicode-width = "0.1.9"
|
unicode-width = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "df"
|
name = "df"
|
||||||
|
|
|
@ -240,7 +240,7 @@ impl Options {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(!intersected_types.is_empty()).then(|| intersected_types)
|
(!intersected_types.is_empty()).then_some(intersected_types)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/dir.rs"
|
path = "src/dir.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] }
|
clap = { workspace=true, features = ["env"] }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] }
|
uucore = { workspace=true, features=["entries", "fs"] }
|
||||||
uu_ls = { version = ">=0.0.17", path="../ls"}
|
uu_ls = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "dir"
|
name = "dir"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/dircolors.rs"
|
path = "src/dircolors.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "dircolors"
|
name = "dircolors"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/dirname.rs"
|
path = "src/dirname.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "dirname"
|
name = "dirname"
|
||||||
|
|
|
@ -11,7 +11,7 @@ use uucore::display::print_verbatim;
|
||||||
use uucore::error::{UResult, UUsageError};
|
use uucore::error::{UResult, UUsageError};
|
||||||
use uucore::format_usage;
|
use uucore::format_usage;
|
||||||
|
|
||||||
static ABOUT: &str = "strip last component from file name";
|
static ABOUT: &str = "Strip last component from file name";
|
||||||
const USAGE: &str = "{} [OPTION] NAME...";
|
const USAGE: &str = "{} [OPTION] NAME...";
|
||||||
|
|
||||||
mod options {
|
mod options {
|
||||||
|
|
|
@ -15,14 +15,14 @@ edition = "2021"
|
||||||
path = "src/du.rs"
|
path = "src/du.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { workspace=true }
|
||||||
# For the --exclude & --exclude-from options
|
# For the --exclude & --exclude-from options
|
||||||
glob = "0.3.0"
|
glob = { workspace=true }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] }
|
windows-sys = { workspace=true, features = ["Win32_Storage_FileSystem", "Win32_Foundation"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "du"
|
name = "du"
|
||||||
|
|
|
@ -73,7 +73,7 @@ mod options {
|
||||||
pub const FILE: &str = "FILE";
|
pub const FILE: &str = "FILE";
|
||||||
}
|
}
|
||||||
|
|
||||||
const ABOUT: &str = "estimate file space usage";
|
const ABOUT: &str = "Estimate file space usage";
|
||||||
const LONG_HELP: &str = "
|
const LONG_HELP: &str = "
|
||||||
Display values are in units of the first available SIZE from --block-size,
|
Display values are in units of the first available SIZE from --block-size,
|
||||||
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
|
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/echo.rs"
|
path = "src/echo.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "echo"
|
name = "echo"
|
||||||
|
|
|
@ -13,7 +13,7 @@ use std::str::Chars;
|
||||||
use uucore::error::{FromIo, UResult};
|
use uucore::error::{FromIo, UResult};
|
||||||
use uucore::format_usage;
|
use uucore::format_usage;
|
||||||
|
|
||||||
const ABOUT: &str = "display a line of text";
|
const ABOUT: &str = "Display a line of text";
|
||||||
const USAGE: &str = "{} [OPTIONS]... [STRING]...";
|
const USAGE: &str = "{} [OPTIONS]... [STRING]...";
|
||||||
const AFTER_HELP: &str = r#"
|
const AFTER_HELP: &str = r#"
|
||||||
Echo the STRING(s) to standard output.
|
Echo the STRING(s) to standard output.
|
||||||
|
|
8
src/uu/env/Cargo.toml
vendored
8
src/uu/env/Cargo.toml
vendored
|
@ -15,12 +15,12 @@ edition = "2021"
|
||||||
path = "src/env.rs"
|
path = "src/env.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
rust-ini = "0.18.0"
|
rust-ini = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["signals"]}
|
uucore = { workspace=true, features=["signals"]}
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
nix = { version = "0.25", default-features = false, features = ["signal"] }
|
nix = { workspace=true, features = ["signal"] }
|
||||||
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
2
src/uu/env/src/env.rs
vendored
2
src/uu/env/src/env.rs
vendored
|
@ -25,7 +25,7 @@ use uucore::display::Quotable;
|
||||||
use uucore::error::{UClapError, UResult, USimpleError, UUsageError};
|
use uucore::error::{UClapError, UResult, USimpleError, UUsageError};
|
||||||
use uucore::{format_usage, show_warning};
|
use uucore::{format_usage, show_warning};
|
||||||
|
|
||||||
const ABOUT: &str = "set each NAME to VALUE in the environment and run COMMAND";
|
const ABOUT: &str = "Set each NAME to VALUE in the environment and run COMMAND";
|
||||||
const USAGE: &str = "{} [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]";
|
const USAGE: &str = "{} [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]";
|
||||||
const AFTER_HELP: &str = "\
|
const AFTER_HELP: &str = "\
|
||||||
A mere - implies -i. If no COMMAND, print the resulting environment.
|
A mere - implies -i. If no COMMAND, print the resulting environment.
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/expand.rs"
|
path = "src/expand.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
unicode-width = "0.1.5"
|
unicode-width = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "expand"
|
name = "expand"
|
||||||
|
|
|
@ -15,11 +15,11 @@ edition = "2021"
|
||||||
path = "src/expr.rs"
|
path = "src/expr.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
num-bigint = "0.4.0"
|
num-bigint = { workspace=true }
|
||||||
num-traits = "0.2.15"
|
num-traits = { workspace=true }
|
||||||
onig = { version = "~6.4", default-features = false }
|
onig = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "expr"
|
name = "expr"
|
||||||
|
|
|
@ -12,15 +12,15 @@ categories = ["command-line-utilities"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
num-traits = "0.2.15" # used in src/numerics.rs, which is included by build.rs
|
num-traits = { workspace=true } # used in src/numerics.rs, which is included by build.rs
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
coz = { version = "0.1.3", optional = true }
|
coz = { workspace=true, optional = true }
|
||||||
num-traits = "0.2.15" # Needs at least version 0.2.15 for "OverflowingAdd"
|
num-traits = { workspace=true }
|
||||||
rand = { version = "0.8", features = ["small_rng"] }
|
rand = { workspace=true }
|
||||||
smallvec = { version = "1.10", features = ["union"] }
|
smallvec = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
paste = "1.0.6"
|
paste = "1.0.6"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/false.rs"
|
path = "src/false.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "false"
|
name = "false"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/fmt.rs"
|
path = "src/fmt.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
unicode-width = "0.1.5"
|
unicode-width = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "fmt"
|
name = "fmt"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/fold.rs"
|
path = "src/fold.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "fold"
|
name = "fold"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/groups.rs"
|
path = "src/groups.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "process"] }
|
uucore = { workspace=true, features=["entries", "process"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "groups"
|
name = "groups"
|
||||||
|
|
|
@ -16,17 +16,17 @@ path = "src/hashsum.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
digest = "0.10.6"
|
digest = "0.10.6"
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
memchr = "2"
|
memchr = { workspace=true }
|
||||||
md-5 = "0.10.5"
|
md-5 = "0.10.5"
|
||||||
regex = "1.7.1"
|
regex = { workspace=true }
|
||||||
sha1 = "0.10.1"
|
sha1 = "0.10.1"
|
||||||
sha2 = "0.10.2"
|
sha2 = "0.10.2"
|
||||||
sha3 = "0.10.6"
|
sha3 = "0.10.6"
|
||||||
blake2b_simd = "1.0.0"
|
blake2b_simd = "1.0.1"
|
||||||
blake3 = "1.3.2"
|
blake3 = "1.3.2"
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "hashsum"
|
name = "hashsum"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/head.rs"
|
path = "src/head.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
memchr = "2"
|
memchr = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["ringbuffer", "lines"] }
|
uucore = { workspace=true, features=["ringbuffer", "lines"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "head"
|
name = "head"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/hostid.rs"
|
path = "src/hostid.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "hostid"
|
name = "hostid"
|
||||||
|
|
|
@ -15,12 +15,12 @@ edition = "2021"
|
||||||
path = "src/hostname.rs"
|
path = "src/hostname.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
hostname = { version = "0.3", features = ["set"] }
|
hostname = { version = "0.3", features = ["set"] }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["wide"] }
|
uucore = { workspace=true, features=["wide"] }
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Networking_WinSock", "Win32_Foundation"] }
|
windows-sys = { workspace=true, features = ["Win32_Networking_WinSock", "Win32_Foundation"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "hostname"
|
name = "hostname"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/id.rs"
|
path = "src/id.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "process"] }
|
uucore = { workspace=true, features=["entries", "process"] }
|
||||||
selinux = { version="0.3", optional = true }
|
selinux = { workspace=true, optional=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "id"
|
name = "id"
|
||||||
|
|
|
@ -18,14 +18,14 @@ edition = "2021"
|
||||||
path = "src/install.rs"
|
path = "src/install.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
filetime = "0.2"
|
filetime = { workspace=true }
|
||||||
file_diff = "1.0.0"
|
file_diff = { workspace=true }
|
||||||
libc = ">= 0.2"
|
libc = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode", "perms", "entries"] }
|
uucore = { workspace=true, features=["fs", "mode", "perms", "entries"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
time = "0.3"
|
time = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "install"
|
name = "install"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/join.rs"
|
path = "src/join.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
memchr = "2"
|
memchr = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "join"
|
name = "join"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/kill.rs"
|
path = "src/kill.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
nix = { version = "0.25", features = ["signal"] }
|
nix = { workspace=true, features = ["signal"] }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["signals"] }
|
uucore = { workspace=true, features=["signals"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "kill"
|
name = "kill"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/link.rs"
|
path = "src/link.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "link"
|
name = "link"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/ln.rs"
|
path = "src/ln.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { workspace=true, features=["fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "ln"
|
name = "ln"
|
||||||
|
|
|
@ -85,26 +85,21 @@ impl UError for LnError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn long_usage() -> String {
|
const ABOUT: &str = "Change file owner and group";
|
||||||
String::from(
|
|
||||||
" In the 1st form, create a link to TARGET with the name LINK_NAME.
|
|
||||||
In the 2nd form, create a link to TARGET in the current directory.
|
|
||||||
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
|
|
||||||
Create hard links by default, symbolic links with --symbolic.
|
|
||||||
By default, each destination (name of new link) should not already exist.
|
|
||||||
When creating hard links, each TARGET must exist. Symbolic links
|
|
||||||
can hold arbitrary text; if later resolved, a relative link is
|
|
||||||
interpreted in relation to its parent directory.
|
|
||||||
",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
static ABOUT: &str = "change file owner and group";
|
|
||||||
const USAGE: &str = "\
|
const USAGE: &str = "\
|
||||||
{} [OPTION]... [-T] TARGET LINK_NAME
|
{} [OPTION]... [-T] TARGET LINK_NAME
|
||||||
{} [OPTION]... TARGET
|
{} [OPTION]... TARGET
|
||||||
{} [OPTION]... TARGET... DIRECTORY
|
{} [OPTION]... TARGET... DIRECTORY
|
||||||
{} [OPTION]... -t DIRECTORY TARGET...";
|
{} [OPTION]... -t DIRECTORY TARGET...";
|
||||||
|
const LONG_USAGE: &str = "\
|
||||||
|
In the 1st form, create a link to TARGET with the name LINK_NAME.\n\
|
||||||
|
In the 2nd form, create a link to TARGET in the current directory.\n\
|
||||||
|
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.\n\
|
||||||
|
Create hard links by default, symbolic links with --symbolic.\n\
|
||||||
|
By default, each destination (name of new link) should not already exist.\n\
|
||||||
|
When creating hard links, each TARGET must exist. Symbolic links\n\
|
||||||
|
can hold arbitrary text; if later resolved, a relative link is\n\
|
||||||
|
interpreted in relation to its parent directory.";
|
||||||
|
|
||||||
mod options {
|
mod options {
|
||||||
pub const FORCE: &str = "force";
|
pub const FORCE: &str = "force";
|
||||||
|
@ -124,10 +119,9 @@ static ARG_FILES: &str = "files";
|
||||||
|
|
||||||
#[uucore::main]
|
#[uucore::main]
|
||||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
// clap requires a 'static string
|
|
||||||
let long_usage = format!(
|
let long_usage = format!(
|
||||||
"{}\n{}",
|
"{}\n\n{}",
|
||||||
long_usage(),
|
LONG_USAGE,
|
||||||
backup_control::BACKUP_CONTROL_LONG_HELP
|
backup_control::BACKUP_CONTROL_LONG_HELP
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/logname.rs"
|
path = "src/logname.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "logname"
|
name = "logname"
|
||||||
|
|
|
@ -15,18 +15,18 @@ edition = "2021"
|
||||||
path = "src/ls.rs"
|
path = "src/ls.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
clap = { workspace=true, features = ["env"] }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] }
|
chrono = { workspace=true }
|
||||||
unicode-width = "0.1.8"
|
unicode-width = { workspace=true }
|
||||||
number_prefix = "0.4"
|
number_prefix = { workspace=true }
|
||||||
term_grid = "0.1.5"
|
term_grid = { workspace=true }
|
||||||
terminal_size = "0.2.2"
|
terminal_size = { workspace=true }
|
||||||
glob = "0.3.0"
|
glob = { workspace=true }
|
||||||
lscolors = { version = "0.13.0", default-features=false, features = ["nu-ansi-term"] }
|
lscolors = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["entries", "fs"] }
|
uucore = { workspace=true, features = ["entries", "fs"] }
|
||||||
once_cell = "1.13.1"
|
once_cell = { workspace=true }
|
||||||
atty = "0.2"
|
atty = { workspace=true }
|
||||||
selinux = { version="0.3", optional = true }
|
selinux = { workspace=true, optional = true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "ls"
|
name = "ls"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/mkdir.rs"
|
path = "src/mkdir.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode"] }
|
uucore = { workspace=true, features=["fs", "mode"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "mkdir"
|
name = "mkdir"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/mkfifo.rs"
|
path = "src/mkfifo.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "mkfifo"
|
name = "mkfifo"
|
||||||
|
|
|
@ -16,9 +16,9 @@ name = "uu_mknod"
|
||||||
path = "src/mknod.rs"
|
path = "src/mknod.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
libc = "^0.2.137"
|
libc = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["mode"] }
|
uucore = { workspace=true, features=["mode"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "mknod"
|
name = "mknod"
|
||||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
||||||
path = "src/mktemp.rs"
|
path = "src/mktemp.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
rand = "0.8"
|
rand = { workspace=true }
|
||||||
tempfile = "3"
|
tempfile = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "mktemp"
|
name = "mktemp"
|
||||||
|
|
|
@ -28,7 +28,7 @@ use std::os::unix::prelude::PermissionsExt;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
static ABOUT: &str = "create a temporary file or directory.";
|
static ABOUT: &str = "Create a temporary file or directory.";
|
||||||
const USAGE: &str = "{} [OPTION]... [TEMPLATE]";
|
const USAGE: &str = "{} [OPTION]... [TEMPLATE]";
|
||||||
|
|
||||||
static DEFAULT_TEMPLATE: &str = "tmp.XXXXXXXXXX";
|
static DEFAULT_TEMPLATE: &str = "tmp.XXXXXXXXXX";
|
||||||
|
|
|
@ -15,15 +15,15 @@ edition = "2021"
|
||||||
path = "src/more.rs"
|
path = "src/more.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
crossterm = ">=0.19"
|
crossterm = { workspace=true }
|
||||||
atty = "0.2"
|
atty = { workspace=true }
|
||||||
unicode-width = "0.1.7"
|
unicode-width = { workspace=true }
|
||||||
unicode-segmentation = "1.9.0"
|
unicode-segmentation = { workspace=true }
|
||||||
|
|
||||||
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
|
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
|
||||||
nix = { version = "0.25", default-features = false }
|
nix = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "more"
|
name = "more"
|
||||||
|
|
|
@ -15,11 +15,10 @@ edition = "2021"
|
||||||
path = "src/mv.rs"
|
path = "src/mv.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
fs_extra = "1.3.0"
|
fs_extra = { workspace=true }
|
||||||
indicatif = "0.17"
|
indicatif = { workspace=true }
|
||||||
|
uucore = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "mv"
|
name = "mv"
|
||||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
||||||
path = "src/nice.rs"
|
path = "src/nice.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
nix = { version = "0.25", default-features = false }
|
nix = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "nice"
|
name = "nice"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/nl.rs"
|
path = "src/nl.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
regex = "1.7.1"
|
regex = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "nl"
|
name = "nl"
|
||||||
|
|
|
@ -18,7 +18,7 @@ use uucore::format_usage;
|
||||||
|
|
||||||
mod helper;
|
mod helper;
|
||||||
|
|
||||||
static ABOUT: &str = "number lines of files";
|
static ABOUT: &str = "Number lines of files";
|
||||||
static USAGE: &str = "{} [OPTION]... [FILE]...";
|
static USAGE: &str = "{} [OPTION]... [FILE]...";
|
||||||
|
|
||||||
// Settings store options used by nl to produce its output.
|
// Settings store options used by nl to produce its output.
|
||||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
||||||
path = "src/nohup.rs"
|
path = "src/nohup.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
atty = "0.2"
|
atty = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { workspace=true, features=["fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "nohup"
|
name = "nohup"
|
||||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
||||||
path = "src/nproc.rs"
|
path = "src/nproc.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
num_cpus = "1.14"
|
num_cpus = { workspace=true }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { workspace=true, features=["fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "nproc"
|
name = "nproc"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/numfmt.rs"
|
path = "src/numfmt.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "numfmt"
|
name = "numfmt"
|
||||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
||||||
path = "src/od.rs"
|
path = "src/od.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
byteorder = "1.3.2"
|
byteorder = { workspace=true }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
half = "2.1"
|
half = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "od"
|
name = "od"
|
||||||
|
|
|
@ -50,7 +50,7 @@ use uucore::show_error;
|
||||||
use uucore::show_warning;
|
use uucore::show_warning;
|
||||||
|
|
||||||
const PEEK_BUFFER_SIZE: usize = 4; // utf-8 can be 4 bytes
|
const PEEK_BUFFER_SIZE: usize = 4; // utf-8 can be 4 bytes
|
||||||
static ABOUT: &str = "dump files in octal and other formats";
|
static ABOUT: &str = "Dump files in octal and other formats";
|
||||||
|
|
||||||
static USAGE: &str = "\
|
static USAGE: &str = "\
|
||||||
{} [OPTION]... [--] [FILENAME]...
|
{} [OPTION]... [--] [FILENAME]...
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/paste.rs"
|
path = "src/paste.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "paste"
|
name = "paste"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/pathchk.rs"
|
path = "src/pathchk.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "pathchk"
|
name = "pathchk"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/pinky.rs"
|
path = "src/pinky.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["utmpx", "entries"] }
|
uucore = { workspace=true, features=["utmpx", "entries"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "pinky"
|
name = "pinky"
|
||||||
|
|
|
@ -22,7 +22,7 @@ use clap::{crate_version, Arg, ArgAction, Command};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use uucore::format_usage;
|
use uucore::format_usage;
|
||||||
|
|
||||||
static ABOUT: &str = "lightweight finger";
|
static ABOUT: &str = "Lightweight finger";
|
||||||
const USAGE: &str = "{} [OPTION]... [USER]...";
|
const USAGE: &str = "{} [OPTION]... [USER]...";
|
||||||
|
|
||||||
mod options {
|
mod options {
|
||||||
|
|
|
@ -15,12 +15,12 @@ edition = "2021"
|
||||||
path = "src/pr.rs"
|
path = "src/pr.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
time = { version = "0.3", features = ["local-offset", "macros", "formatting"] }
|
time = { workspace=true, features = ["local-offset", "macros", "formatting"] }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries"] }
|
uucore = { workspace=true, features=["entries"] }
|
||||||
quick-error = "2.0.1"
|
quick-error = { workspace=true }
|
||||||
itertools = "0.10.0"
|
itertools = { workspace=true }
|
||||||
regex = "1.7"
|
regex = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "pr"
|
name = "pr"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/printenv.rs"
|
path = "src/printenv.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "printenv"
|
name = "printenv"
|
||||||
|
|
|
@ -18,8 +18,8 @@ edition = "2021"
|
||||||
path = "src/printf.rs"
|
path = "src/printf.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["memo"] }
|
uucore = { workspace=true, features=["memo"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "printf"
|
name = "printf"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/ptx.rs"
|
path = "src/ptx.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
regex = "1.7.1"
|
regex = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "ptx"
|
name = "ptx"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/pwd.rs"
|
path = "src/pwd.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "pwd"
|
name = "pwd"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/readlink.rs"
|
path = "src/readlink.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { workspace=true, features=["fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "readlink"
|
name = "readlink"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/realpath.rs"
|
path = "src/realpath.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { workspace=true, features=["fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "realpath"
|
name = "realpath"
|
||||||
|
|
|
@ -23,7 +23,7 @@ use uucore::{
|
||||||
};
|
};
|
||||||
use uucore::{error::UClapError, show, show_if_err};
|
use uucore::{error::UClapError, show, show_if_err};
|
||||||
|
|
||||||
static ABOUT: &str = "print the resolved path";
|
static ABOUT: &str = "Print the resolved path";
|
||||||
const USAGE: &str = "{} [OPTION]... FILE...";
|
const USAGE: &str = "{} [OPTION]... FILE...";
|
||||||
|
|
||||||
static OPT_QUIET: &str = "quiet";
|
static OPT_QUIET: &str = "quiet";
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/relpath.rs"
|
path = "src/relpath.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { workspace=true, features=["fs"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "relpath"
|
name = "relpath"
|
||||||
|
|
|
@ -15,16 +15,15 @@ edition = "2021"
|
||||||
path = "src/rm.rs"
|
path = "src/rm.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
walkdir = "2.2"
|
walkdir = { workspace=true }
|
||||||
remove_dir_all = "0.7.0"
|
uucore = { workspace=true, features=["fs"] }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
windows-sys = { version = "0.42.0", default-features = false, features = ["Win32_Storage_FileSystem"] }
|
windows-sys = { workspace=true, features = ["Win32_Storage_FileSystem"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rm"
|
name = "rm"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
// spell-checker:ignore (path) eacces
|
// spell-checker:ignore (path) eacces
|
||||||
|
|
||||||
use clap::{crate_version, parser::ValueSource, Arg, ArgAction, Command};
|
use clap::{crate_version, parser::ValueSource, Arg, ArgAction, Command};
|
||||||
use remove_dir_all::remove_dir_all;
|
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
use std::fs::{self, File, Metadata};
|
use std::fs::{self, File, Metadata};
|
||||||
use std::io::ErrorKind;
|
use std::io::ErrorKind;
|
||||||
|
@ -298,9 +297,7 @@ fn handle_dir(path: &Path, options: &Options) -> bool {
|
||||||
let is_root = path.has_root() && path.parent().is_none();
|
let is_root = path.has_root() && path.parent().is_none();
|
||||||
if options.recursive && (!is_root || !options.preserve_root) {
|
if options.recursive && (!is_root || !options.preserve_root) {
|
||||||
if options.interactive != InteractiveMode::Always && !options.verbose {
|
if options.interactive != InteractiveMode::Always && !options.verbose {
|
||||||
// we need the extra crate because apparently fs::remove_dir_all() does not function
|
if let Err(e) = fs::remove_dir_all(path) {
|
||||||
// correctly on Windows
|
|
||||||
if let Err(e) = remove_dir_all(path) {
|
|
||||||
had_err = true;
|
had_err = true;
|
||||||
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
||||||
// GNU compatibility (rm/fail-eacces.sh)
|
// GNU compatibility (rm/fail-eacces.sh)
|
||||||
|
@ -457,7 +454,7 @@ fn prompt_file(path: &Path, options: &Options, is_dir: bool) -> bool {
|
||||||
}
|
}
|
||||||
if is_dir {
|
if is_dir {
|
||||||
// We can't use metadata.permissions.readonly for directories because it only works on files
|
// We can't use metadata.permissions.readonly for directories because it only works on files
|
||||||
// So we have to handle wether a directory is writable on not manually
|
// So we have to handle whether a directory is writable on not manually
|
||||||
if let Ok(metadata) = fs::metadata(path) {
|
if let Ok(metadata) = fs::metadata(path) {
|
||||||
handle_writable_directory(path, options, &metadata)
|
handle_writable_directory(path, options, &metadata)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/rmdir.rs"
|
path = "src/rmdir.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
uucore = { workspace=true, features=["fs"] }
|
||||||
libc = "0.2.137"
|
libc = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rmdir"
|
name = "rmdir"
|
||||||
|
|
|
@ -14,11 +14,11 @@ edition = "2021"
|
||||||
path = "src/runcon.rs"
|
path = "src/runcon.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version = ">=0.0.9", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||||
selinux = { version = "0.3" }
|
selinux = { workspace=true }
|
||||||
thiserror = { version = "1.0" }
|
thiserror = { workspace=true }
|
||||||
libc = { version = "0.2" }
|
libc = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "runcon"
|
name = "runcon"
|
||||||
|
|
|
@ -16,11 +16,11 @@ edition = "2021"
|
||||||
path = "src/seq.rs"
|
path = "src/seq.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bigdecimal = "0.3"
|
bigdecimal = { workspace=true }
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
num-bigint = "0.4.0"
|
num-bigint = { workspace=true }
|
||||||
num-traits = "0.2.15"
|
num-traits = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["memo"] }
|
uucore = { workspace=true, features=["memo"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "seq"
|
name = "seq"
|
||||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
||||||
path = "src/shred.rs"
|
path = "src/shred.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
rand = "0.8"
|
rand = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "shred"
|
name = "shred"
|
||||||
|
|
|
@ -15,11 +15,11 @@ edition = "2021"
|
||||||
path = "src/shuf.rs"
|
path = "src/shuf.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
memchr = "2.5.0"
|
memchr = { workspace=true }
|
||||||
rand = "0.8"
|
rand = { workspace=true }
|
||||||
rand_core = "0.6"
|
rand_core = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "shuf"
|
name = "shuf"
|
||||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
||||||
path = "src/sleep.rs"
|
path = "src/sleep.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { workspace=true }
|
||||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
uucore = { workspace=true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "sleep"
|
name = "sleep"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue