1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-03 14:37:45 +00:00

cp: add progress bar

Adds the `-g` and `--progress` flags to enable a progress bar via
indicatif.
This commit is contained in:
Terts Diepraam 2022-09-05 10:56:04 +02:00
parent 1172a7e781
commit 21e691c3b9
5 changed files with 149 additions and 11 deletions

48
Cargo.lock generated
View file

@ -281,7 +281,7 @@ dependencies = [
"once_cell",
"strsim",
"termcolor",
"terminal_size",
"terminal_size 0.2.2",
]
[[package]]
@ -327,6 +327,20 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3"
[[package]]
name = "console"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89eab4d20ce20cea182308bca13088fecea9c05f6776cf287205d41a0ed3c847"
dependencies = [
"encode_unicode",
"libc",
"once_cell",
"terminal_size 0.1.17",
"unicode-width",
"winapi",
]
[[package]]
name = "constant_time_eq"
version = "0.1.5"
@ -791,6 +805,12 @@ version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]]
name = "encode_unicode"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "env_logger"
version = "0.8.4"
@ -1047,6 +1067,17 @@ dependencies = [
"hashbrown",
]
[[package]]
name = "indicatif"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc42b206e70d86ec03285b123e65a5458c92027d1fb2ae3555878b8113b3ddf"
dependencies = [
"console",
"number_prefix",
"unicode-width",
]
[[package]]
name = "inotify"
version = "0.9.6"
@ -2033,6 +2064,16 @@ 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"
@ -2050,7 +2091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
dependencies = [
"smawk",
"terminal_size",
"terminal_size 0.2.2",
"unicode-linebreak",
"unicode-width",
]
@ -2293,6 +2334,7 @@ dependencies = [
"clap 4.0.22",
"exacl",
"filetime",
"indicatif",
"libc",
"quick-error",
"selinux",
@ -2598,7 +2640,7 @@ dependencies = [
"once_cell",
"selinux",
"term_grid",
"terminal_size",
"terminal_size 0.2.2",
"unicode-width",
"uucore",
]