From 044f3d3a434f03848f044690ea4df0d17d51b32b Mon Sep 17 00:00:00 2001 From: Koki Ueha Date: Sun, 19 Feb 2023 14:54:33 +0000 Subject: [PATCH] yes: move help strings to markdown file --- src/uu/yes/src/yes.rs | 6 +++--- src/uu/yes/yes.md | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/uu/yes/yes.md diff --git a/src/uu/yes/src/yes.rs b/src/uu/yes/src/yes.rs index 22ccebab2..714bdcac5 100644 --- a/src/uu/yes/src/yes.rs +++ b/src/uu/yes/src/yes.rs @@ -12,13 +12,13 @@ use std::io::{self, Result, Write}; use clap::{Arg, ArgAction, Command}; use uucore::error::{UResult, USimpleError}; -use uucore::format_usage; +use uucore::{format_usage, help_about, help_usage}; #[cfg(any(target_os = "linux", target_os = "android"))] mod splice; -const ABOUT: &str = "Repeatedly display a line with STRING (or 'y')"; -const USAGE: &str = "{} [STRING]..."; +const ABOUT: &str = help_about!("yes.md"); +const USAGE: &str = help_usage!("yes.md"); // it's possible that using a smaller or larger buffer might provide better performance on some // systems, but honestly this is good enough diff --git a/src/uu/yes/yes.md b/src/uu/yes/yes.md new file mode 100644 index 000000000..ad2da7dc9 --- /dev/null +++ b/src/uu/yes/yes.md @@ -0,0 +1,7 @@ +# yes + +``` +yes [STRING]... +``` + +Repeatedly display a line with STRING (or 'y')