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_DESC: "Core universal (cross-platform) utilities"
|
||||
PROJECT_AUTH: "uutils"
|
||||
RUST_MIN_SRV: "1.60.0" ## MSRV v1.60.0
|
||||
RUST_MIN_SRV: "1.64.0"
|
||||
# * 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
|
||||
|
||||
|
|
99
Cargo.lock
generated
99
Cargo.lock
generated
|
@ -128,13 +128,13 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|||
|
||||
[[package]]
|
||||
name = "blake2b_simd"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127"
|
||||
checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"arrayvec",
|
||||
"constant_time_eq 0.1.5",
|
||||
"constant_time_eq",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -147,7 +147,7 @@ dependencies = [
|
|||
"arrayvec",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"constant_time_eq 0.2.4",
|
||||
"constant_time_eq",
|
||||
"digest",
|
||||
]
|
||||
|
||||
|
@ -246,7 +246,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"strsim",
|
||||
"termcolor",
|
||||
"terminal_size 0.2.2",
|
||||
"terminal_size",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -285,24 +285,17 @@ checksum = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3"
|
|||
|
||||
[[package]]
|
||||
name = "console"
|
||||
version = "0.15.2"
|
||||
version = "0.15.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c"
|
||||
checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60"
|
||||
dependencies = [
|
||||
"encode_unicode",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"terminal_size 0.1.17",
|
||||
"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]]
|
||||
name = "constant_time_eq"
|
||||
version = "0.2.4"
|
||||
|
@ -571,7 +564,7 @@ dependencies = [
|
|||
"autocfg",
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
"memoffset 0.7.1",
|
||||
"memoffset",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
|
@ -637,12 +630,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "ctrlc"
|
||||
version = "3.2.3"
|
||||
version = "3.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173"
|
||||
checksum = "1631ca6e3c59112501a9d87fd86f21591ff77acd31331e8a73f8d80a65bbdd71"
|
||||
dependencies = [
|
||||
"nix",
|
||||
"winapi",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1095,9 +1088,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "indicatif"
|
||||
version = "0.17.2"
|
||||
version = "0.17.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19"
|
||||
checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729"
|
||||
dependencies = [
|
||||
"console",
|
||||
"number_prefix",
|
||||
|
@ -1207,9 +1200,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.137"
|
||||
version = "0.2.139"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
|
||||
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
|
@ -1294,15 +1287,6 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.7.1"
|
||||
|
@ -1341,16 +1325,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.25.0"
|
||||
version = "0.26.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"
|
||||
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"memoffset 0.6.5",
|
||||
"pin-utils",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1843,25 +1825,6 @@ dependencies = [
|
|||
"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]]
|
||||
name = "rlimit"
|
||||
version = "0.8.3"
|
||||
|
@ -2106,6 +2069,12 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.10.0"
|
||||
|
@ -2158,7 +2127,7 @@ dependencies = [
|
|||
"fastrand",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"remove_dir_all 0.5.3",
|
||||
"remove_dir_all",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
|
@ -2180,16 +2149,6 @@ dependencies = [
|
|||
"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]]
|
||||
name = "terminal_size"
|
||||
version = "0.2.2"
|
||||
|
@ -2207,7 +2166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
|
||||
dependencies = [
|
||||
"smawk",
|
||||
"terminal_size 0.2.2",
|
||||
"terminal_size",
|
||||
"unicode-linebreak",
|
||||
"unicode-width",
|
||||
]
|
||||
|
@ -2749,7 +2708,7 @@ dependencies = [
|
|||
"once_cell",
|
||||
"selinux",
|
||||
"term_grid",
|
||||
"terminal_size 0.2.2",
|
||||
"terminal_size",
|
||||
"unicode-width",
|
||||
"uucore",
|
||||
]
|
||||
|
@ -2970,7 +2929,6 @@ version = "0.0.17"
|
|||
dependencies = [
|
||||
"clap",
|
||||
"libc",
|
||||
"remove_dir_all 0.7.0",
|
||||
"uucore",
|
||||
"walkdir",
|
||||
"windows-sys",
|
||||
|
@ -3152,7 +3110,6 @@ version = "0.0.17"
|
|||
dependencies = [
|
||||
"clap",
|
||||
"libc",
|
||||
"retain_mut",
|
||||
"uucore",
|
||||
]
|
||||
|
||||
|
|
113
Cargo.toml
113
Cargo.toml
|
@ -1,7 +1,7 @@
|
|||
# coreutils (uutils)
|
||||
# * 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]
|
||||
name = "coreutils"
|
||||
|
@ -16,7 +16,7 @@ repository = "https://github.com/uutils/coreutils"
|
|||
readme = "README.md"
|
||||
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
|
||||
categories = ["command-line-utilities"]
|
||||
rust-version = "1.60.0"
|
||||
rust-version = "1.64.0"
|
||||
edition = "2021"
|
||||
|
||||
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)
|
||||
test = [ "uu_test" ]
|
||||
|
||||
[workspace]
|
||||
|
||||
[dependencies]
|
||||
[workspace.dependencies]
|
||||
atty = "0.2"
|
||||
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_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"
|
||||
onig = { version = "~6.4", default-features = false }
|
||||
ouroboros = "0.15.5"
|
||||
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"] }
|
||||
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" }
|
||||
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
|
||||
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()`)
|
||||
|
||||
[dev-dependencies]
|
||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||
chrono = { workspace=true }
|
||||
conv = "0.3"
|
||||
filetime = "0.2"
|
||||
glob = "0.3.0"
|
||||
libc = "0.2"
|
||||
filetime = { workspace=true }
|
||||
glob = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
pretty_assertions = "1"
|
||||
rand = "0.8"
|
||||
regex = "1.7"
|
||||
rand = { workspace=true }
|
||||
regex = { workspace=true }
|
||||
sha1 = { version="0.10", features=["std"] }
|
||||
tempfile = "3"
|
||||
time = {version="0.3", features=["local-offset"]}
|
||||
tempfile = { workspace=true }
|
||||
time = { workspace=true, features=["local-offset"] }
|
||||
unindent = "0.1"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="src/uucore", features=["entries", "process", "signals"] }
|
||||
walkdir = "2.2"
|
||||
atty = "0.2"
|
||||
uucore = { workspace=true, features=["entries", "process", "signals"] }
|
||||
walkdir = { workspace=true }
|
||||
atty = { workspace=true }
|
||||
hex-literal = "0.3.1"
|
||||
rstest = "0.16.0"
|
||||
|
||||
|
@ -411,12 +484,12 @@ procfs = { version = "0.14", default-features = false }
|
|||
rlimit = "0.8.3"
|
||||
|
||||
[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" }
|
||||
rand_pcg = "0.3"
|
||||
|
||||
[build-dependencies]
|
||||
phf_codegen = "0.11.1"
|
||||
phf_codegen = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "coreutils"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
[](https://deps.rs/repo/github/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
|
||||
|
||||
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
|
||||
|
||||
|
|
15
deny.toml
15
deny.toml
|
@ -58,20 +58,7 @@ highlight = "all"
|
|||
# For each duplicate dependency, indicate the name of the dependency which
|
||||
# introduces it.
|
||||
# spell-checker: disable
|
||||
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"},
|
||||
]
|
||||
skip = []
|
||||
# spell-checker: enable
|
||||
|
||||
# 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
|
||||
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` can display a progress bar when the `-g`/`--progress` flag is set.
|
||||
|
@ -36,4 +41,5 @@ therefore welcomed.
|
|||
|
||||
## `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()
|
||||
.to_string();
|
||||
|
||||
if result != "" {
|
||||
if !result.is_empty() {
|
||||
Some(result)
|
||||
} else {
|
||||
None
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/arch.rs"
|
||||
|
||||
[dependencies]
|
||||
platform-info = "1.0.2"
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
platform-info = { workspace=true }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "arch"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/base32.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features = ["encoding"] }
|
||||
|
||||
[[bin]]
|
||||
name = "base32"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/base64.rs"
|
||||
|
||||
[dependencies]
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] }
|
||||
uu_base32 = { version=">=0.0.17", package="uu_base32", path="../base32"}
|
||||
uucore = { workspace=true, features = ["encoding"] }
|
||||
uu_base32 = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "base64"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/basename.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "basename"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/basenc.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["encoding"] }
|
||||
uu_base32 = { version=">=0.0.17", package="uu_base32", path="../base32"}
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features = ["encoding"] }
|
||||
uu_base32 = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "basenc"
|
||||
|
|
|
@ -20,7 +20,7 @@ use std::io::{stdin, Read};
|
|||
use uucore::error::UClapError;
|
||||
|
||||
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.
|
||||
|
||||
When decoding, the input may contain newlines in addition to the bytes of
|
||||
|
|
|
@ -15,13 +15,13 @@ edition = "2021"
|
|||
path = "src/cat.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
thiserror = "1.0"
|
||||
atty = "0.2"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "pipes"] }
|
||||
clap = { workspace=true }
|
||||
thiserror = { workspace = true }
|
||||
atty = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs", "pipes"] }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
nix = { version = "0.25", default-features = false }
|
||||
nix = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "cat"
|
||||
|
|
|
@ -14,12 +14,12 @@ edition = "2021"
|
|||
path = "src/chcon.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version = ">=0.0.9", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
||||
selinux = { version = "0.3" }
|
||||
fts-sys = { version = "0.2" }
|
||||
thiserror = { version = "1.0" }
|
||||
libc = { version = "0.2" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||
selinux = { workspace=true }
|
||||
thiserror = { workspace = true }
|
||||
libc = { workspace=true }
|
||||
fts-sys = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "chcon"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/chgrp.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||
|
||||
[[bin]]
|
||||
name = "chgrp"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/chmod.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "0.2.137"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode"] }
|
||||
clap = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs", "mode"] }
|
||||
|
||||
[[bin]]
|
||||
name = "chmod"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/chown.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||
|
||||
[[bin]]
|
||||
name = "chown"
|
||||
|
|
|
@ -19,7 +19,7 @@ use clap::{crate_version, Arg, ArgAction, ArgMatches, Command};
|
|||
use std::fs;
|
||||
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 = "\
|
||||
{} [OPTION]... [OWNER][:[GROUP]] FILE...
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/chroot.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "chroot"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/cksum.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "cksum"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/comm.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "comm"
|
||||
|
|
|
@ -17,7 +17,7 @@ use uucore::format_usage;
|
|||
|
||||
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 = "";
|
||||
const USAGE: &str = "{} [OPTION]... FILE1 FILE2";
|
||||
|
||||
|
|
|
@ -19,18 +19,18 @@ edition = "2021"
|
|||
path = "src/cp.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
filetime = "0.2"
|
||||
libc = "0.2.137"
|
||||
quick-error = "2.0.1"
|
||||
selinux = { version="0.3", optional=true }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs", "perms", "mode"] }
|
||||
walkdir = "2.2"
|
||||
indicatif = "0.17"
|
||||
clap = { workspace=true }
|
||||
filetime = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
quick-error = { workspace=true }
|
||||
selinux = { workspace=true, optional=true }
|
||||
uucore = { workspace=true, features=["entries", "fs", "perms", "mode"] }
|
||||
walkdir = { workspace=true }
|
||||
indicatif = { workspace=true }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
xattr="0.2.3"
|
||||
exacl= { version = "0.9.0", optional=true }
|
||||
xattr = { workspace=true }
|
||||
exacl = { workspace=true, optional=true }
|
||||
|
||||
[[bin]]
|
||||
name = "cp"
|
||||
|
|
|
@ -523,7 +523,7 @@ pub fn uu_app() -> Command {
|
|||
.long(options::SPARSE)
|
||||
.value_name("WHEN")
|
||||
.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
|
||||
.arg(
|
||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
|||
path = "src/csplit.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
thiserror = "1.0"
|
||||
regex = "1.7.1"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] }
|
||||
clap = { workspace=true }
|
||||
thiserror = { workspace = true }
|
||||
regex = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "csplit"
|
||||
|
|
|
@ -22,7 +22,7 @@ mod split_name;
|
|||
use crate::csplit_error::CsplitError;
|
||||
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.";
|
||||
const USAGE: &str = "{} [OPTION]... FILE PATTERN...";
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ edition = "2021"
|
|||
path = "src/cut.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
memchr = "2"
|
||||
bstr = "1.0"
|
||||
atty = "0.2"
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
memchr = { workspace=true }
|
||||
bstr = { workspace=true }
|
||||
atty = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "cut"
|
||||
|
|
|
@ -15,15 +15,15 @@ edition = "2021"
|
|||
path = "src/date.rs"
|
||||
|
||||
[dependencies]
|
||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
chrono = { workspace=true }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2"
|
||||
libc = { workspace=true }
|
||||
|
||||
[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]]
|
||||
name = "date"
|
||||
|
|
|
@ -36,7 +36,7 @@ const MINUTE: &str = "minute";
|
|||
const SECOND: &str = "second";
|
||||
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 = "\
|
||||
{} [OPTION]... [+FORMAT]...
|
||||
{} [OPTION]... [MMDDhhmm[[CC]YY][.ss]]";
|
||||
|
|
|
@ -15,13 +15,13 @@ edition = "2021"
|
|||
path = "src/dd.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
gcd = "2.2"
|
||||
libc = "0.2"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
gcd = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
||||
signal-hook = "0.3.14"
|
||||
signal-hook = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "dd"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/df.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["libc", "fsext"] }
|
||||
unicode-width = "0.1.9"
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["libc", "fsext"] }
|
||||
unicode-width = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
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"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "fs"] }
|
||||
uu_ls = { version = ">=0.0.17", path="../ls"}
|
||||
clap = { workspace=true, features = ["env"] }
|
||||
uucore = { workspace=true, features=["entries", "fs"] }
|
||||
uu_ls = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "dir"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/dircolors.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "dircolors"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/dirname.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "dirname"
|
||||
|
|
|
@ -11,7 +11,7 @@ use uucore::display::print_verbatim;
|
|||
use uucore::error::{UResult, UUsageError};
|
||||
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...";
|
||||
|
||||
mod options {
|
||||
|
|
|
@ -15,14 +15,14 @@ edition = "2021"
|
|||
path = "src/du.rs"
|
||||
|
||||
[dependencies]
|
||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||
chrono = { workspace=true }
|
||||
# For the --exclude & --exclude-from options
|
||||
glob = "0.3.0"
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
glob = { workspace=true }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[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]]
|
||||
name = "du"
|
||||
|
|
|
@ -73,7 +73,7 @@ mod options {
|
|||
pub const FILE: &str = "FILE";
|
||||
}
|
||||
|
||||
const ABOUT: &str = "estimate file space usage";
|
||||
const ABOUT: &str = "Estimate file space usage";
|
||||
const LONG_HELP: &str = "
|
||||
Display values are in units of the first available SIZE from --block-size,
|
||||
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/echo.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "echo"
|
||||
|
|
|
@ -13,7 +13,7 @@ use std::str::Chars;
|
|||
use uucore::error::{FromIo, UResult};
|
||||
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 AFTER_HELP: &str = r#"
|
||||
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"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
rust-ini = "0.18.0"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["signals"]}
|
||||
clap = { workspace=true }
|
||||
rust-ini = { workspace=true }
|
||||
uucore = { workspace=true, features=["signals"]}
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
nix = { version = "0.25", default-features = false, features = ["signal"] }
|
||||
nix = { workspace=true, features = ["signal"] }
|
||||
|
||||
|
||||
[[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::{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 AFTER_HELP: &str = "\
|
||||
A mere - implies -i. If no COMMAND, print the resulting environment.
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/expand.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
unicode-width = "0.1.5"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
unicode-width = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "expand"
|
||||
|
|
|
@ -15,11 +15,11 @@ edition = "2021"
|
|||
path = "src/expr.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
num-bigint = "0.4.0"
|
||||
num-traits = "0.2.15"
|
||||
onig = { version = "~6.4", default-features = false }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
num-bigint = { workspace=true }
|
||||
num-traits = { workspace=true }
|
||||
onig = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "expr"
|
||||
|
|
|
@ -12,15 +12,15 @@ categories = ["command-line-utilities"]
|
|||
edition = "2021"
|
||||
|
||||
[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]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
coz = { version = "0.1.3", optional = true }
|
||||
num-traits = "0.2.15" # Needs at least version 0.2.15 for "OverflowingAdd"
|
||||
rand = { version = "0.8", features = ["small_rng"] }
|
||||
smallvec = { version = "1.10", features = ["union"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
coz = { workspace=true, optional = true }
|
||||
num-traits = { workspace=true }
|
||||
rand = { workspace=true }
|
||||
smallvec = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[dev-dependencies]
|
||||
paste = "1.0.6"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/false.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "false"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/fmt.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
unicode-width = "0.1.5"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
unicode-width = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "fmt"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/fold.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "fold"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/groups.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "process"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "process"] }
|
||||
|
||||
[[bin]]
|
||||
name = "groups"
|
||||
|
|
|
@ -16,17 +16,17 @@ path = "src/hashsum.rs"
|
|||
|
||||
[dependencies]
|
||||
digest = "0.10.6"
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
clap = { workspace=true }
|
||||
hex = "0.4.3"
|
||||
memchr = "2"
|
||||
memchr = { workspace=true }
|
||||
md-5 = "0.10.5"
|
||||
regex = "1.7.1"
|
||||
regex = { workspace=true }
|
||||
sha1 = "0.10.1"
|
||||
sha2 = "0.10.2"
|
||||
sha3 = "0.10.6"
|
||||
blake2b_simd = "1.0.0"
|
||||
blake2b_simd = "1.0.1"
|
||||
blake3 = "1.3.2"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "hashsum"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/head.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
memchr = "2"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["ringbuffer", "lines"] }
|
||||
clap = { workspace=true }
|
||||
memchr = { workspace=true }
|
||||
uucore = { workspace=true, features=["ringbuffer", "lines"] }
|
||||
|
||||
[[bin]]
|
||||
name = "head"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/hostid.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "0.2.137"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "hostid"
|
||||
|
|
|
@ -15,12 +15,12 @@ edition = "2021"
|
|||
path = "src/hostname.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
clap = { workspace=true }
|
||||
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]
|
||||
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]]
|
||||
name = "hostname"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/id.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries", "process"] }
|
||||
selinux = { version="0.3", optional = true }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "process"] }
|
||||
selinux = { workspace=true, optional=true }
|
||||
|
||||
[[bin]]
|
||||
name = "id"
|
||||
|
|
|
@ -18,14 +18,14 @@ edition = "2021"
|
|||
path = "src/install.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
filetime = "0.2"
|
||||
file_diff = "1.0.0"
|
||||
libc = ">= 0.2"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode", "perms", "entries"] }
|
||||
clap = { workspace=true }
|
||||
filetime = { workspace=true }
|
||||
file_diff = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs", "mode", "perms", "entries"] }
|
||||
|
||||
[dev-dependencies]
|
||||
time = "0.3"
|
||||
time = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "install"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/join.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
memchr = "2"
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
memchr = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "join"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/kill.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
nix = { version = "0.25", features = ["signal"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["signals"] }
|
||||
clap = { workspace=true }
|
||||
nix = { workspace=true, features = ["signal"] }
|
||||
uucore = { workspace=true, features=["signals"] }
|
||||
|
||||
[[bin]]
|
||||
name = "kill"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/link.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "link"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/ln.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "ln"
|
||||
|
|
|
@ -85,26 +85,21 @@ impl UError for LnError {
|
|||
}
|
||||
}
|
||||
|
||||
fn long_usage() -> String {
|
||||
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 ABOUT: &str = "Change file owner and group";
|
||||
const USAGE: &str = "\
|
||||
{} [OPTION]... [-T] TARGET LINK_NAME
|
||||
{} [OPTION]... TARGET
|
||||
{} [OPTION]... TARGET... DIRECTORY
|
||||
{} [OPTION]... -t DIRECTORY TARGET...";
|
||||
{} [OPTION]... [-T] TARGET LINK_NAME
|
||||
{} [OPTION]... TARGET
|
||||
{} [OPTION]... TARGET... DIRECTORY
|
||||
{} [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 {
|
||||
pub const FORCE: &str = "force";
|
||||
|
@ -124,10 +119,9 @@ static ARG_FILES: &str = "files";
|
|||
|
||||
#[uucore::main]
|
||||
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
// clap requires a 'static string
|
||||
let long_usage = format!(
|
||||
"{}\n{}",
|
||||
long_usage(),
|
||||
"{}\n\n{}",
|
||||
LONG_USAGE,
|
||||
backup_control::BACKUP_CONTROL_LONG_HELP
|
||||
);
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/logname.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2.137"
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
libc = { workspace=true }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "logname"
|
||||
|
|
|
@ -15,18 +15,18 @@ edition = "2021"
|
|||
path = "src/ls.rs"
|
||||
|
||||
[dependencies]
|
||||
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] }
|
||||
unicode-width = "0.1.8"
|
||||
number_prefix = "0.4"
|
||||
term_grid = "0.1.5"
|
||||
terminal_size = "0.2.2"
|
||||
glob = "0.3.0"
|
||||
lscolors = { version = "0.13.0", default-features=false, features = ["nu-ansi-term"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features = ["entries", "fs"] }
|
||||
once_cell = "1.13.1"
|
||||
atty = "0.2"
|
||||
selinux = { version="0.3", optional = true }
|
||||
clap = { workspace=true, features = ["env"] }
|
||||
chrono = { workspace=true }
|
||||
unicode-width = { workspace=true }
|
||||
number_prefix = { workspace=true }
|
||||
term_grid = { workspace=true }
|
||||
terminal_size = { workspace=true }
|
||||
glob = { workspace=true }
|
||||
lscolors = { workspace=true }
|
||||
uucore = { workspace=true, features = ["entries", "fs"] }
|
||||
once_cell = { workspace=true }
|
||||
atty = { workspace=true }
|
||||
selinux = { workspace=true, optional = true }
|
||||
|
||||
[[bin]]
|
||||
name = "ls"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/mkdir.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs", "mode"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs", "mode"] }
|
||||
|
||||
[[bin]]
|
||||
name = "mkdir"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/mkfifo.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "0.2.137"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "mkfifo"
|
||||
|
|
|
@ -16,9 +16,9 @@ name = "uu_mknod"
|
|||
path = "src/mknod.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "^0.2.137"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["mode"] }
|
||||
clap = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
uucore = { workspace=true, features=["mode"] }
|
||||
|
||||
[[bin]]
|
||||
name = "mknod"
|
||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
|||
path = "src/mktemp.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
rand = "0.8"
|
||||
tempfile = "3"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
rand = { workspace=true }
|
||||
tempfile = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "mktemp"
|
||||
|
|
|
@ -28,7 +28,7 @@ use std::os::unix::prelude::PermissionsExt;
|
|||
use rand::Rng;
|
||||
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]";
|
||||
|
||||
static DEFAULT_TEMPLATE: &str = "tmp.XXXXXXXXXX";
|
||||
|
|
|
@ -15,15 +15,15 @@ edition = "2021"
|
|||
path = "src/more.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
crossterm = ">=0.19"
|
||||
atty = "0.2"
|
||||
unicode-width = "0.1.7"
|
||||
unicode-segmentation = "1.9.0"
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
crossterm = { workspace=true }
|
||||
atty = { workspace=true }
|
||||
unicode-width = { workspace=true }
|
||||
unicode-segmentation = { workspace=true }
|
||||
|
||||
[target.'cfg(all(unix, not(target_os = "fuchsia")))'.dependencies]
|
||||
nix = { version = "0.25", default-features = false }
|
||||
nix = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "more"
|
||||
|
|
|
@ -15,11 +15,10 @@ edition = "2021"
|
|||
path = "src/mv.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
fs_extra = "1.3.0"
|
||||
indicatif = "0.17"
|
||||
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
fs_extra = { workspace=true }
|
||||
indicatif = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "mv"
|
||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
|||
path = "src/nice.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "0.2.137"
|
||||
nix = { version = "0.25", default-features = false }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
nix = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "nice"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/nl.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
regex = "1.7.1"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
regex = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "nl"
|
||||
|
|
|
@ -18,7 +18,7 @@ use uucore::format_usage;
|
|||
|
||||
mod helper;
|
||||
|
||||
static ABOUT: &str = "number lines of files";
|
||||
static ABOUT: &str = "Number lines of files";
|
||||
static USAGE: &str = "{} [OPTION]... [FILE]...";
|
||||
|
||||
// Settings store options used by nl to produce its output.
|
||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
|||
path = "src/nohup.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "0.2.137"
|
||||
atty = "0.2"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
clap = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
atty = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "nohup"
|
||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
|||
path = "src/nproc.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2.137"
|
||||
num_cpus = "1.14"
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
libc = { workspace=true }
|
||||
num_cpus = { workspace=true }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "nproc"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/numfmt.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "numfmt"
|
||||
|
|
|
@ -15,10 +15,10 @@ edition = "2021"
|
|||
path = "src/od.rs"
|
||||
|
||||
[dependencies]
|
||||
byteorder = "1.3.2"
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
half = "2.1"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
byteorder = { workspace=true }
|
||||
clap = { workspace=true }
|
||||
half = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "od"
|
||||
|
|
|
@ -50,7 +50,7 @@ use uucore::show_error;
|
|||
use uucore::show_warning;
|
||||
|
||||
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 = "\
|
||||
{} [OPTION]... [--] [FILENAME]...
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/paste.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "paste"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/pathchk.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
libc = "0.2.137"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "pathchk"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/pinky.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["utmpx", "entries"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["utmpx", "entries"] }
|
||||
|
||||
[[bin]]
|
||||
name = "pinky"
|
||||
|
|
|
@ -22,7 +22,7 @@ use clap::{crate_version, Arg, ArgAction, Command};
|
|||
use std::path::PathBuf;
|
||||
use uucore::format_usage;
|
||||
|
||||
static ABOUT: &str = "lightweight finger";
|
||||
static ABOUT: &str = "Lightweight finger";
|
||||
const USAGE: &str = "{} [OPTION]... [USER]...";
|
||||
|
||||
mod options {
|
||||
|
|
|
@ -15,12 +15,12 @@ edition = "2021"
|
|||
path = "src/pr.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
time = { version = "0.3", features = ["local-offset", "macros", "formatting"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["entries"] }
|
||||
quick-error = "2.0.1"
|
||||
itertools = "0.10.0"
|
||||
regex = "1.7"
|
||||
clap = { workspace=true }
|
||||
time = { workspace=true, features = ["local-offset", "macros", "formatting"] }
|
||||
uucore = { workspace=true, features=["entries"] }
|
||||
quick-error = { workspace=true }
|
||||
itertools = { workspace=true }
|
||||
regex = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "pr"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/printenv.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "printenv"
|
||||
|
|
|
@ -18,8 +18,8 @@ edition = "2021"
|
|||
path = "src/printf.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["memo"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["memo"] }
|
||||
|
||||
[[bin]]
|
||||
name = "printf"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/ptx.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
regex = "1.7.1"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
regex = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "ptx"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/pwd.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "pwd"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/readlink.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "readlink"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/realpath.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "realpath"
|
||||
|
|
|
@ -23,7 +23,7 @@ use uucore::{
|
|||
};
|
||||
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...";
|
||||
|
||||
static OPT_QUIET: &str = "quiet";
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/relpath.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
|
||||
[[bin]]
|
||||
name = "relpath"
|
||||
|
|
|
@ -15,16 +15,15 @@ edition = "2021"
|
|||
path = "src/rm.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
walkdir = "2.2"
|
||||
remove_dir_all = "0.7.0"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
clap = { workspace=true }
|
||||
walkdir = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
libc = "0.2.137"
|
||||
libc = { workspace=true }
|
||||
|
||||
[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]]
|
||||
name = "rm"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
// spell-checker:ignore (path) eacces
|
||||
|
||||
use clap::{crate_version, parser::ValueSource, Arg, ArgAction, Command};
|
||||
use remove_dir_all::remove_dir_all;
|
||||
use std::collections::VecDeque;
|
||||
use std::fs::{self, File, Metadata};
|
||||
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();
|
||||
if options.recursive && (!is_root || !options.preserve_root) {
|
||||
if options.interactive != InteractiveMode::Always && !options.verbose {
|
||||
// we need the extra crate because apparently fs::remove_dir_all() does not function
|
||||
// correctly on Windows
|
||||
if let Err(e) = remove_dir_all(path) {
|
||||
if let Err(e) = fs::remove_dir_all(path) {
|
||||
had_err = true;
|
||||
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
||||
// GNU compatibility (rm/fail-eacces.sh)
|
||||
|
@ -457,7 +454,7 @@ fn prompt_file(path: &Path, options: &Options, is_dir: bool) -> bool {
|
|||
}
|
||||
if is_dir {
|
||||
// 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) {
|
||||
handle_writable_directory(path, options, &metadata)
|
||||
} else {
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/rmdir.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["fs"] }
|
||||
libc = "0.2.137"
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["fs"] }
|
||||
libc = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "rmdir"
|
||||
|
|
|
@ -14,11 +14,11 @@ edition = "2021"
|
|||
path = "src/runcon.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version = ">=0.0.9", package="uucore", path="../../uucore", features=["entries", "fs", "perms"] }
|
||||
selinux = { version = "0.3" }
|
||||
thiserror = { version = "1.0" }
|
||||
libc = { version = "0.2" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true, features=["entries", "fs", "perms"] }
|
||||
selinux = { workspace=true }
|
||||
thiserror = { workspace=true }
|
||||
libc = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "runcon"
|
||||
|
|
|
@ -16,11 +16,11 @@ edition = "2021"
|
|||
path = "src/seq.rs"
|
||||
|
||||
[dependencies]
|
||||
bigdecimal = "0.3"
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
num-bigint = "0.4.0"
|
||||
num-traits = "0.2.15"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore", features=["memo"] }
|
||||
bigdecimal = { workspace=true }
|
||||
clap = { workspace=true }
|
||||
num-bigint = { workspace=true }
|
||||
num-traits = { workspace=true }
|
||||
uucore = { workspace=true, features=["memo"] }
|
||||
|
||||
[[bin]]
|
||||
name = "seq"
|
||||
|
|
|
@ -15,9 +15,9 @@ edition = "2021"
|
|||
path = "src/shred.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
rand = "0.8"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
rand = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "shred"
|
||||
|
|
|
@ -15,11 +15,11 @@ edition = "2021"
|
|||
path = "src/shuf.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
memchr = "2.5.0"
|
||||
rand = "0.8"
|
||||
rand_core = "0.6"
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
memchr = { workspace=true }
|
||||
rand = { workspace=true }
|
||||
rand_core = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
name = "shuf"
|
||||
|
|
|
@ -15,8 +15,8 @@ edition = "2021"
|
|||
path = "src/sleep.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||
uucore = { version=">=0.0.17", package="uucore", path="../../uucore" }
|
||||
clap = { workspace=true }
|
||||
uucore = { workspace=true }
|
||||
|
||||
[[bin]]
|
||||
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