From 96a148b5585331a303581253a6f2beb1c94ebbe5 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski Date: Sun, 19 Mar 2023 13:18:03 +0100 Subject: [PATCH] fold: move move help strings to markdown file --- src/uu/fold/fold.md | 8 ++++++++ src/uu/fold/src/fold.rs | 7 +++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 src/uu/fold/fold.md diff --git a/src/uu/fold/fold.md b/src/uu/fold/fold.md new file mode 100644 index 000000000..13062c858 --- /dev/null +++ b/src/uu/fold/fold.md @@ -0,0 +1,8 @@ +# fold + +``` +fold [OPTION]... [FILE]... +``` + +Writes each file (or standard input if no files are given) +to standard output whilst breaking long lines diff --git a/src/uu/fold/src/fold.rs b/src/uu/fold/src/fold.rs index dee30b258..01eba0b82 100644 --- a/src/uu/fold/src/fold.rs +++ b/src/uu/fold/src/fold.rs @@ -13,13 +13,12 @@ use std::io::{stdin, BufRead, BufReader, Read}; use std::path::Path; use uucore::display::Quotable; use uucore::error::{FromIo, UResult, USimpleError}; -use uucore::format_usage; +use uucore::{format_usage, help_about, help_usage}; const TAB_WIDTH: usize = 8; -static USAGE: &str = "{} [OPTION]... [FILE]..."; -static ABOUT: &str = "Writes each file (or standard input if no files are given) - to standard output whilst breaking long lines"; +const USAGE: &str = help_usage!("fold.md"); +const ABOUT: &str = help_about!("fold.md"); mod options { pub const BYTES: &str = "bytes";