mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
feat(df) add 'df' uutil
This commit is contained in:
committed by
Roy Ivy III
parent
f734d48405
commit
d5228b5a64
Generated
+23
@@ -408,6 +408,17 @@ dependencies = [
|
||||
"uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "df"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.6.2"
|
||||
@@ -1912,6 +1923,16 @@ name = "utf8-ranges"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "uucore"
|
||||
version = "0.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uucore"
|
||||
version = "0.0.2"
|
||||
@@ -1951,6 +1972,7 @@ dependencies = [
|
||||
"cp 0.0.1",
|
||||
"cut 0.0.1",
|
||||
"date 0.0.1",
|
||||
"df 0.0.1",
|
||||
"dircolors 0.0.1",
|
||||
"dirname 0.0.1",
|
||||
"du 0.0.1",
|
||||
@@ -2295,6 +2317,7 @@ dependencies = [
|
||||
"checksum unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa2700417c405c38f5e6902d699345241c28c0b7ade4abaad71e35a87eb1564"
|
||||
"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
|
||||
"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
|
||||
"checksum uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d9991e24be65c5df85c9f16445554785a68e5ae7ec7feb230424ba35c24ebad7"
|
||||
"checksum uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)" = "<none>"
|
||||
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
|
||||
@@ -33,6 +33,7 @@ feat_common_core = [
|
||||
"cp",
|
||||
"cut",
|
||||
"date",
|
||||
"df",
|
||||
"dircolors",
|
||||
"dirname",
|
||||
"echo",
|
||||
@@ -228,6 +229,7 @@ comm = { optional=true, path="src/uu/comm" }
|
||||
cp = { optional=true, path="src/uu/cp" }
|
||||
cut = { optional=true, path="src/uu/cut" }
|
||||
date = { optional=true, path="src/uu/date" }
|
||||
df = { optional=true, path="src/uu/df" }
|
||||
dircolors= { optional=true, path="src/uu/dircolors" }
|
||||
dirname = { optional=true, path="src/uu/dirname" }
|
||||
du = { optional=true, path="src/uu/du" }
|
||||
|
||||
@@ -54,6 +54,7 @@ PROGS := \
|
||||
comm \
|
||||
cp \
|
||||
cut \
|
||||
df \
|
||||
dircolors \
|
||||
dirname \
|
||||
echo \
|
||||
|
||||
@@ -276,17 +276,17 @@ Utilities
|
||||
| arch | cp | chcon |
|
||||
| base32 | expr | csplit |
|
||||
| base64 | install | dd |
|
||||
| basename | ls | df |
|
||||
| cat | more | numfmt |
|
||||
| chgrp | od (`--strings` and 128-bit data types missing) | pr |
|
||||
| chmod | printf | runcon |
|
||||
| chown | sort | stty |
|
||||
| basename | ls | numfmt |
|
||||
| cat | more | pr |
|
||||
| chgrp | od (`--strings` and 128-bit data types missing) | runcon |
|
||||
| chmod | printf | stty |
|
||||
| chown | sort | |
|
||||
| chroot | split | |
|
||||
| cksum | tail | |
|
||||
| comm | test | |
|
||||
| cut | date | |
|
||||
| dircolors | join | |
|
||||
| dirname | | |
|
||||
| dirname | df | |
|
||||
| du | | |
|
||||
| echo | | |
|
||||
| env | | |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
[package]
|
||||
name = "df"
|
||||
version = "0.0.1"
|
||||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "uu_df"
|
||||
path = "df.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = "2.32.0"
|
||||
libc = "0.2.42"
|
||||
uucore = "0.0.1"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
kernel32-sys = "*"
|
||||
winapi = "*"
|
||||
|
||||
[[bin]]
|
||||
name = "df"
|
||||
path = "main.rs"
|
||||
Executable
+720
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
extern crate uu_df;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_df::uumain(std::env::args().collect()));
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
use common::util::*;
|
||||
|
||||
#[test]
|
||||
fn test_df_compatible() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
let result = ucmd.arg("-ah").run();
|
||||
assert!(result.success);
|
||||
}
|
||||
// TODO
|
||||
@@ -54,6 +54,7 @@ generic! {
|
||||
"cut", test_cut;
|
||||
"dircolors", test_dircolors;
|
||||
"dirname", test_dirname;
|
||||
"df", test_df;
|
||||
"du", test_du;
|
||||
"echo", test_echo;
|
||||
"env", test_env;
|
||||
|
||||
Reference in New Issue
Block a user