From fd02bd13a1807a33701cf9ad96d9621480d6f633 Mon Sep 17 00:00:00 2001 From: m11o Date: Mon, 24 Apr 2023 23:35:52 +0900 Subject: [PATCH] seq: move help strings to md file --- src/uu/seq/seq.md | 9 +++++++++ src/uu/seq/src/seq.rs | 10 ++++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 src/uu/seq/seq.md diff --git a/src/uu/seq/seq.md b/src/uu/seq/seq.md new file mode 100644 index 000000000..065404e20 --- /dev/null +++ b/src/uu/seq/seq.md @@ -0,0 +1,9 @@ +# seq + +Display numbers from FIRST to LAST, in steps of INCREMENT. + +``` +seq [OPTION]... LAST +seq [OPTION]... FIRST LAST +seq [OPTION]... FIRST INCREMENT LAST"; +``` diff --git a/src/uu/seq/src/seq.rs b/src/uu/seq/src/seq.rs index 40bac8449..3e42e1708 100644 --- a/src/uu/seq/src/seq.rs +++ b/src/uu/seq/src/seq.rs @@ -12,9 +12,9 @@ use num_traits::Zero; use uucore::error::FromIo; use uucore::error::UResult; -use uucore::format_usage; use uucore::memo::printf; use uucore::show; +use uucore::{format_usage, help_about, help_usage}; mod error; mod extendedbigdecimal; @@ -27,11 +27,9 @@ use crate::extendedbigint::ExtendedBigInt; use crate::number::Number; use crate::number::PreciseNumber; -static ABOUT: &str = "Display numbers from FIRST to LAST, in steps of INCREMENT."; -const USAGE: &str = "\ - {} [OPTION]... LAST - {} [OPTION]... FIRST LAST - {} [OPTION]... FIRST INCREMENT LAST"; +const ABOUT: &str = help_about!("seq.md"); +const USAGE: &str = help_usage!("seq.md"); + static OPT_SEPARATOR: &str = "separator"; static OPT_TERMINATOR: &str = "terminator"; static OPT_WIDTHS: &str = "widths";