diff --git a/src/uu/sum/src/sum.rs b/src/uu/sum/src/sum.rs index 1134f2444..0ea415b13 100644 --- a/src/uu/sum/src/sum.rs +++ b/src/uu/sum/src/sum.rs @@ -13,11 +13,10 @@ use std::io::{stdin, Read}; use std::path::Path; use uucore::display::Quotable; use uucore::error::{FromIo, UResult, USimpleError}; -use uucore::{format_usage, show}; +use uucore::{format_usage, help_about, help_usage, show}; -static USAGE: &str = "{} [OPTION]... [FILE]..."; -static ABOUT: &str = "Checksum and count the blocks in a file.\n\n\ - With no FILE, or when FILE is -, read standard input."; +const USAGE: &str = help_usage!("sum.md"); +const ABOUT: &str = help_about!("sum.md"); // This can be replaced with usize::div_ceil once it is stabilized. // This implementation approach is optimized for when `b` is a constant, diff --git a/src/uu/sum/sum.md b/src/uu/sum/sum.md new file mode 100644 index 000000000..ca3adb81f --- /dev/null +++ b/src/uu/sum/sum.md @@ -0,0 +1,9 @@ +# sum + +``` +sum [OPTION]... [FILE]..." +``` + +Checksum and count the blocks in a file. + +With no FILE, or when FILE is -, read standard input.