From 0ca5020b083541e99fd78847e75b20c82f16073b Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski Date: Sun, 19 Mar 2023 11:59:14 +0100 Subject: [PATCH] who: move help strings to markdown file --- src/uu/who/src/who.rs | 6 +++--- src/uu/who/who.md | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/uu/who/who.md diff --git a/src/uu/who/src/who.rs b/src/uu/who/src/who.rs index 935319c31..26248b12b 100644 --- a/src/uu/who/src/who.rs +++ b/src/uu/who/src/who.rs @@ -18,7 +18,7 @@ use std::ffi::CStr; use std::fmt::Write; use std::os::unix::fs::MetadataExt; use std::path::PathBuf; -use uucore::format_usage; +use uucore::{format_usage, help_about, help_usage}; mod options { pub const ALL: &str = "all"; @@ -38,8 +38,8 @@ mod options { pub const FILE: &str = "FILE"; // if length=1: FILE, if length=2: ARG1 ARG2 } -static ABOUT: &str = "Print information about users who are currently logged in."; -const USAGE: &str = "{} [OPTION]... [ FILE | ARG1 ARG2 ]"; +const ABOUT: &str = help_about!("who.md"); +const USAGE: &str = help_usage!("who.md"); #[cfg(target_os = "linux")] static RUNLEVEL_HELP: &str = "print current runlevel"; diff --git a/src/uu/who/who.md b/src/uu/who/who.md new file mode 100644 index 000000000..6adc26597 --- /dev/null +++ b/src/uu/who/who.md @@ -0,0 +1,8 @@ +# who + +``` +who [OPTION]... [ FILE | ARG1 ARG2 ] +``` + +Print information about users who are currently logged in. +