mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Merge pull request #100 from Heather/master
du --version was not implemented
This commit is contained in:
commit
12df0b0d90
1 changed files with 5 additions and 2 deletions
7
du/du.rs
7
du/du.rs
|
@ -141,8 +141,8 @@ fn main() {
|
|||
// In main
|
||||
getopts::optopt("", "time-style", "show times using style STYLE:
|
||||
full-iso, long-iso, iso, +FORMAT FORMAT is interpreted like 'date'", "STYLE"),
|
||||
getopts::optflag("", "help", "display this help and exit"),
|
||||
getopts::optflag("", "version", "output version information and exit"),
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
getopts::optflag("V", "version", "output version information and exit"),
|
||||
];
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
|
@ -170,6 +170,9 @@ SIZE is an integer and optional unit (example: 10M is 10*1024*1024).
|
|||
Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (pow‐
|
||||
ers of 1000).");
|
||||
return
|
||||
} else if matches.opt_present("version") {
|
||||
println!("du version: {}", VERSION);
|
||||
return
|
||||
}
|
||||
|
||||
let options = Options{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue