mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Changed truncate to use multi-line println!
This commit is contained in:
parent
28f7f66c02
commit
9877f5de19
1 changed files with 18 additions and 17 deletions
|
@ -55,23 +55,24 @@ fn main() {
|
||||||
println!(" {0:s} [OPTION]... FILE...", program);
|
println!(" {0:s} [OPTION]... FILE...", program);
|
||||||
println!("");
|
println!("");
|
||||||
print!("{}", groups::usage("Shrink or extend the size of each file to the specified size.", opts));
|
print!("{}", groups::usage("Shrink or extend the size of each file to the specified size.", opts));
|
||||||
println!("");
|
print!("
|
||||||
println!("SIZE is an integer with an optional prefix and optional unit.");
|
SIZE is an integer with an optional prefix and optional unit.
|
||||||
println!("The available units (K, M, G, T, P, E, Z, and Y) use the following format:");
|
The available units (K, M, G, T, P, E, Z, and Y) use the following format:
|
||||||
println!("\t'KB' => 1000 (kilobytes)");
|
'KB' => 1000 (kilobytes)
|
||||||
println!("\t'K' => 1024 (kibibytes)");
|
'K' => 1024 (kibibytes)
|
||||||
println!("\t'MB' => 1000*1000 (megabytes)");
|
'MB' => 1000*1000 (megabytes)
|
||||||
println!("\t'M' => 1024*1024 (mebibytes)");
|
'M' => 1024*1024 (mebibytes)
|
||||||
println!("\t'GB' => 1000*1000*1000 (gigabytes)");
|
'GB' => 1000*1000*1000 (gigabytes)
|
||||||
println!("\t'G' => 1024*1024*1024 (gibibytes)");
|
'G' => 1024*1024*1024 (gibibytes)
|
||||||
println!("SIZE may also be prefixed by one of the following to adjust the size of each");
|
SIZE may also be prefixed by one of the following to adjust the size of each
|
||||||
println!("file based on its current size:");
|
file based on its current size:
|
||||||
println!("\t'+' => extend by");
|
'+' => extend by
|
||||||
println!("\t'-' => reduce by");
|
'-' => reduce by
|
||||||
println!("\t'<' => at most");
|
'<' => at most
|
||||||
println!("\t'>' => at least");
|
'>' => at least
|
||||||
println!("\t'/' => round down to multiple of");
|
'/' => round down to multiple of
|
||||||
println!("\t'%' => round up to multiple of");
|
'%' => round up to multiple of
|
||||||
|
");
|
||||||
} else if matches.opt_present("version") {
|
} else if matches.opt_present("version") {
|
||||||
println!("truncate 1.0.0");
|
println!("truncate 1.0.0");
|
||||||
} else if matches.free.is_empty() {
|
} else if matches.free.is_empty() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue