From 0bb557bf25dd9a28a0dc2c1abce8f3ac38fc93a8 Mon Sep 17 00:00:00 2001 From: IZUMI-Zu <274620705z@gmail.com> Date: Wed, 8 Mar 2023 16:57:25 +0800 Subject: [PATCH] uname: move help strings to a markdown file --- src/uu/uname/src/uname.rs | 7 +++---- src/uu/uname/uname.md | 9 +++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 src/uu/uname/uname.md diff --git a/src/uu/uname/src/uname.rs b/src/uu/uname/src/uname.rs index f74f18772..df744dd85 100644 --- a/src/uu/uname/src/uname.rs +++ b/src/uu/uname/src/uname.rs @@ -14,12 +14,11 @@ use clap::{crate_version, Arg, ArgAction, Command}; use platform_info::*; use uucore::{ error::{FromIo, UResult}, - format_usage, + format_usage, help_about, help_usage, }; -const ABOUT: &str = r#"Print certain system information. -With no OPTION, same as -s."#; -const USAGE: &str = "{} [OPTION]..."; +const ABOUT: &str = help_about!("uname.md"); +const USAGE: &str = help_usage!("uname.md"); pub mod options { pub static ALL: &str = "all"; diff --git a/src/uu/uname/uname.md b/src/uu/uname/uname.md new file mode 100644 index 000000000..9780c627a --- /dev/null +++ b/src/uu/uname/uname.md @@ -0,0 +1,9 @@ +# uname + + +``` +uname [OPTION]... +``` + +Print certain system information. +With no OPTION, same as -s.